0
,我收到以下错误 Image for the error错误,而使用水豚当我尝试使用水豚测试页面来测试页面
这是我的Gemfile代码:
gem 'rails', '3.2.21'
gem 'sqlite3'
gem 'rspec-rails'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
group :test do
gem 'capybara'
end
group :production do
gem 'pg'
end
这是为static_pages_spec.rb
代码:
require 'spec_helper'
describe "Static pages" do
describe "Home page" do
it "should have the content 'Sample App'" do
visit '/static_pages/home'
page.should have_content('Sample App')
end
end
end
当我更换GET访问,问题被解决。
同样的问题出现在 “page.should hava_content” 部分
有什么建议?
thanx..it worked..but我不得不更换与rails_helper spec_helper –