ruby on rails - rspec: undefined method 'has_conent?' -
hello having issue railstutorial.
i have test file features/static_pages_spec.rb
require 'spec_helper' describe "static pages" describe "home page" "should have content 'sample app'" visit '/static_pages/home' page.should have_conent('sample app') end end end
when run bundle exec rspec spec/features/static_pages_spec.rb
i following error:
failures: 1) static pages home page should have content 'sample app' failure/error: page.should have_conent('sample app') nomethoderror: undefined method `has_conent?' #<capybara::session> # ./spec/features/static_pages_spec.rb:9:in `block (3 levels) in <top (required)>' finished in 0.05262 seconds 1 example, 1 failure failed examples: rspec ./spec/features/static_pages_spec.rb:6 # static pages home page should have content 'sample app' randomized seed 49777
i tried add in spec_helper.rb
config.include capybara::dsl
gives me same error.
just typo:
page.should have_conent('sample app')
should
page.should have_content('sample app')
Comments
Post a Comment