I follow this article where I can write this code in this ruby file below and there is an example application on the home page, but it still says that the static page of the home page should have the content “Sample application” when I run bundle exec rspec spec/requests/static_pages_spec.rb
spec / requests / static_pages_spec file code:
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
home.html.erb
<h1>Sample App</h1>
<p>
This is the home page for the
<a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
sample application.
</p>
Below is my gem file for this application. Please advise. thank you for your help.
source 'https://rubygems.org'
gem 'rails', '3.2.1'
gem 'sqlite3'
group :development do
gem 'rspec-rails', '2.6.0'
end
group :test do
gem 'webrat', '0.7.1'
gem 'capybara', '1.0.0.beta1'
end
group :assets do
gem 'sass-rails', '3.2.3'
gem 'coffee-rails', '3.2.1'
gem 'uglifier', '1.0.3'
end
gem 'jquery-rails', '2.0.0'
group :production do
gem 'pg', '0.12.2'
end
source
share