Hoping someone can see what I missed ...
I'm trying to get Capybara to work in a small existing application ... and I'm out of luck.
Gemfile:
group :development, :test do gem 'rspec-rails'
Similar specifications in two places fail for various reasons. Do not know why?
specifications / controllers / pages_controller_spec.rb:
require 'spec_helper' describe PagesController do describe "GET 'about'" do it "should be successful" do
Failures: (maybe pull to some kind of shared page, since the doctype in the browser is "<!DOCTYPE html>"
)
1) PagesController GET 'about' should be successful Failure/Error: page.html.should match(/About/i) expected "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n\n" to match /About/i # ./spec/controllers/pages_controller_spec.rb:13:in `block (3 levels) in <top (required)>' 2) PagesController GET 'about' should have the right title Failure/Error: page.should have_selector("title") expected css "title" to return something # ./spec/controllers/pages_controller_spec.rb:20:in `block (3 levels) in <top (required)>'
specifications / opinions / pages / about.html.haml_spec.rb:
require 'spec_helper' describe "pages/about.html.haml" do it "renders attributes in <p>" do
Failures:
1) pages/about.html.haml renders attributes in <p> Failure/Error: visit pages_about_path NoMethodError: undefined method `visit' for #<RSpec::Core::ExampleGroup::Nested_1:0x00000101dc2970> # ./spec/views/pages/about.html.haml_spec.rb:8:in `block (2 levels) in <top (required)>' 2) pages/about.html.haml should have the right heading Failure/Error: visit pages_about_path NoMethodError: undefined method `visit' for
Meltemi
source share