require File.dirname(__FILE__) + '/../integration_helper' describe Locomotive::Steam::Server do include Rack::Test::Methods def app run_server end it 'shows the index page' do get '/index' last_response.body.should =~ /Upcoming events/ end it 'shows the 404 page' do get '/void' last_response.status.should eq(404) last_response.body.should =~ /page not found/ end it 'shows the 404 page with 200 status code when its called explicitly' do get '/404' last_response.status.should eq(200) last_response.body.should =~ /page not found/ end it 'shows content' do get '/about-us/jane-doe' last_response.body.should =~ /Lorem ipsum dolor sit amet/ end it 'shows a content type template ' do get '/songs/song-number-1' last_response.body.should =~ /Song #1/ end it 'renders a page under a templatized one' do get '/songs/song-number-1/band' last_response.body.should =~ /Song #1/ last_response.body.should =~ /Leader: Eddie/ end it 'translates strings' do get '/en' last_response.body.should =~ /Powered by/ get '/fr' last_response.body.should =~ /Propulsé par/ get '/nb' last_response.body.should_not =~ /Powered by/ end it 'provides translation in scopes' do get '/' last_response.body.should =~ /scoped_translation=.French./ end it 'translates a page with link_to tags inside' do get '/fr/notre-musique' last_response.body.should =~ /
A complicated one name indeed.<\/p>/ end end describe 'nav' do subject { get '/all'; last_response.body } it { should_not match(/