require 'rspec/webservice_matchers'
describe 'My app' do
context 'www.myapp.com' do
it { should be_up }
it { should have_a_valid_cert }
end
it 'serves the "about" page without redirecting' do
expect('http://www.myapp.com/about').to be_status 200
end
it 'only serves via www' do
expect('http://myapp.com').to redirect_permanently_to 'http://www.myapp.com/'
end
it 'forces visitors to use https' do
expect('myapp.com').to enforce_https_everywhere
end
end