Skip to content

Instantly share code, notes, and snippets.

@thumblemonks
Created October 16, 2009 04:45
Show Gist options
  • Save thumblemonks/211569 to your computer and use it in GitHub Desktop.
Save thumblemonks/211569 to your computer and use it in GitHub Desktop.
class FoosController < ActionController::Base
end
context "a controller test" do
controlling :foos
asserts("situation") { self }.respond_to(:get)
asserts("situation") { self }.respond_to(:post)
asserts("situation") { self }.respond_to(:put)
asserts("situation") { self }.respond_to(:delete)
asserts "an unknown action" do
get :burberry
end.raises(ActionController::UnknownAction, "No action responded to burberry")
end # a controller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment