I am trying to test a rails application using rspec 2.10.0 + capybara 1.1.2. Here is my test file
require 'spec_helper'
describe AdminPanelController do
describe "index" do
it "should have return code 200" do
visit '/admin'
page.should have_content "hello"
end
end
end
And here is the test result
Failure/Error: page.should have_content "hello"
Capybara::ElementNotFound:
Unable to find xpath "/html"
I google about this problem, but I find only information that webrat may be a problem, but I do not have this gem. Thanks for any suggestions.
source
share