Skip to content

Commit

Permalink
Try to fix running feature tests on non-English computers.
Browse files Browse the repository at this point in the history
  • Loading branch information
GUI committed May 27, 2016
1 parent 0e9fc44 commit 875db7f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/api-umbrella/web-app/spec/support/capybara.rb
Expand Up @@ -60,4 +60,16 @@ def delay_all_ajax_calls(delay = 1500)

RSpec.configure do |config|
config.include CapybaraFeatureHelpers, :type => :feature

config.before(:each, :type => :feature) do
# Set the default language for tests to US English.
#
# This ensures we have a consistent baseline for testing, regardless of the
# default language on the computer running tests. See:
# https://github.com/NREL/api-umbrella/issues/242
#
# We then explicitly test the support of other languages by overriding this
# in spec/features/admin/locales_spec.rb
page.driver.add_headers("Accept-Language" => "en-US")
end
end

0 comments on commit 875db7f

Please sign in to comment.