Skip to content

Instantly share code, notes, and snippets.

@ch1ago
Created June 14, 2012 19:42
Show Gist options
  • Save ch1ago/2932466 to your computer and use it in GitHub Desktop.
Save ch1ago/2932466 to your computer and use it in GitHub Desktop.
this page https://github.com/rspec/rspec-rails
tells me to do this...
describe "events/show" do
it "displays the event location" do
assign(:event, stub_model(Event,
:location => "Chicago"
))
render
rendered.should contain("Chicago")
end
end
but when I do it, it says *contain* method does not exist
Failures:
1) home/user_create_school_request.js.erb renders the create school_user_requests remote form
Failure/Error: rendered.should contain("Chicago")
NoMethodError:
undefined method `contain' for #<RSpec::Core::ExampleGroup::Nested_1:0xa3db968>
# ./spec/views/home/user_create_school_request.js.erb_spec.rb:12:in `block (2 levels) in <top (required)>'
Finished in 1.13 seconds
am I missing something?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment