Here's my Gemfile:
group :development, :test do
> gem 'rspec-rails', '2.0.0'
> gem 'cucumber-rails', '0.3.2'
> gem 'capybara', '0.4.0.rc'
> end
and here's my spec:
describe "welcome/index.html.haml" do
> it "displays 'Problem Child' in the header" do
> render
> rendered.should contain("Problem Child")
> end
> end
This results in the error given in the subject:
Failures:
> 1) welcome/index.html.haml displays 'Problem Child' in the header
> Failure/Error: rendered.should contain("Problem Child")
> undefined method `contain' for
> #<RSpec::Core::ExampleGroup::Nested_1:0x10595b1a8>
Does the "contain" matcher come with Webrat? Is that why the RSpec book
seems to be lying to me? I'm trying to get the feel of RSpec and I love the
idea of speccing views. I've been approximately following along with The
RSpec Book. I'm using Capybara instead of Webrat because Webrat wasn't
playing well with Rails 3 (I forget the details).
Thanks!
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users