Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the tests to use the newer rspec expectation syntax #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/generators/pages/setup_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
end

it 'creates app/views/pages' do
Dir.exist?(File.expand_path('app/views/pages', destination_root)).should be_true
expect(Dir.exist?(File.expand_path('app/views/pages', destination_root))).to be true
end
end
18 changes: 9 additions & 9 deletions spec/requests/pages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,40 @@
feature 'Pages' do
scenario 'loads the About Page' do
visit '/about'
page.should have_content 'About Page'
expect(page).to have_content 'About Page'
end

scenario 'loads the Contact Page then loads the Team Page' do
visit '/contact'
page.should have_content 'Contact Page'
expect(page).to have_content 'Contact Page'
visit '/team'
page.should have_content 'Team Page'
expect(page).to have_content 'Team Page'
end

scenario 'loads the Press Kit Page' do
visit '/press-kit'
page.should have_content 'Press Kit Page'
expect(page).to have_content 'Press Kit Page'
end

scenario 'loads the Record Deal Page, then loads the User Agreement Page' do
visit '/record-deal'
page.should have_content 'Record Deal Page'
expect(page).to have_content 'Record Deal Page'
visit '/user-agreement'
page.should have_content 'User Agreement Page'
expect(page).to have_content 'User Agreement Page'
end

scenario 'allows namespacing of pages' do
visit '/work/client'
page.should have_content 'Client'
expect(page).to have_content 'Client'
end

scenario 'allows plural namespacing of pages' do
visit '/jobs/new_hire'
page.should have_content 'New Hire'
expect(page).to have_content 'New Hire'
end

scenario 'can override :as' do
visit one_two_three_path
page.should have_content '123 Page'
expect(page).to have_content '123 Page'
end
end