merge master
This commit is contained in:
@ -49,9 +49,9 @@ def expect_redirect(path = nil)
|
||||
end
|
||||
end
|
||||
|
||||
def expect_status(status)
|
||||
def expect_http_status(status)
|
||||
it "responds with status #{status}" do
|
||||
expect(response.status).to eq(status)
|
||||
expect(response).to have_http_status(status)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
require 'capybara/rspec'
|
||||
require 'selenium/webdriver'
|
||||
|
||||
if ENV['HEADLESS_TEST'] == 'true' || ENV['USER'] == 'vagrant'
|
||||
if ENV.fetch('HEADLESS_TEST', nil) == 'true' || ENV.fetch('USER', nil) == 'vagrant'
|
||||
require 'headless'
|
||||
|
||||
headless = Headless.new
|
||||
@ -14,7 +14,7 @@ Capybara.register_driver :selenium do |app|
|
||||
profile = Selenium::WebDriver::Firefox::Profile.new
|
||||
profile['intl.accept_languages'] = 'en'
|
||||
options = Selenium::WebDriver::Firefox::Options.new
|
||||
options.headless! if ENV['CI'] == 'true'
|
||||
options.headless! if ENV.fetch('CI', nil) == 'true'
|
||||
options.profile = profile
|
||||
driver = Capybara::Selenium::Driver.new(app, browser: :firefox, capabilities: options)
|
||||
driver.browser.manage.window.resize_to(1280, 960)
|
||||
|
Reference in New Issue
Block a user