Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'spec_helper'
- describe 'Static pages'
- subject { page }
- describe "Home page" do
- before { visit root_path }
- it { should have selector('h1', text: 'Sample App') }
- it { should have_selector('title',
- text: "Ruby on Rails Totorial Sample App") }
- it { should_not have_selector('title', text: '| Home') }
- end
- describe "Help page" do
- before { visit help_path }
- it { should have_selector('h1', text: 'Help') }
- it { should have_selector('title',
- text: "Ruby on Rails Tutorial Sample App | Help") }
- end
- describe "About page" do
- before {visit about_path}
- it { should have_selector('h1', text: 'About Us') }
- it { should have_selector('title',
- text: "Ruby on Rails Tutorial Sample App | Abous Us") }
- end
- describe "Contact page" do
- before { visit contact_path }
- it { should have_selector('h1', text: 'Contact') }
- it { should have_selector('title',
- text: "Ruby on Rails Tutorial Sample App | Contact") }
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement