Skip to content

Instantly share code, notes, and snippets.

@juno
Created June 25, 2015 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juno/5de7ef07b0839d703797 to your computer and use it in GitHub Desktop.
Save juno/5de7ef07b0839d703797 to your computer and use it in GitHub Desktop.
Poltergeistを利用したfeature specにおいて、ブラウザの言語設定を明示的に行う
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