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

Fixes tests. #9

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/dummy/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
config.cache_classes = true

# Configure static asset server for tests with Cache-Control for performance
config.serve_static_assets = true
config.serve_static_files = true
config.static_cache_control = "public, max-age=3600"

# Show full error reports and disable caching
Expand Down
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_truthy
end
end
20 changes: 10 additions & 10 deletions spec/requests/pages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,45 @@
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 and get new path' do
visit one_two_three_path
page.should have_content '123 Page'
expect(page).to have_content '123 Page'
end

scenario 'can override :as and preserves url' do
visit '/123'
page.should have_content '123 Page'
expect(page).to have_content '123 Page'
end
end