Created
June 25, 2015 13:04
-
-
Save juno/5de7ef07b0839d703797 to your computer and use it in GitHub Desktop.
Poltergeistを利用したfeature specにおいて、ブラウザの言語設定を明示的に行う
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec.configure do |config| | |
config.before(:each) do |example| | |
# Poltergeistの言語設定をja,enにする | |
if example.metadata[:type] == :feature && example.metadata[:js] | |
page.driver.headers = { | |
'Accept-Language' => 'ja,en', | |
} | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment