diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2019-09-04 11:57:25 +1000 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2019-09-05 12:54:03 +1000 |
commit | 124bad7bd88e7c329583ec3757eb0ba5fcec66e6 (patch) | |
tree | d6ed77fd8739381bf17ce9b0f7774ec78f3c0561 /spec/features | |
parent | 0fca70a40f5067b333ff62e556754b9dd04e26f9 (diff) | |
download | gitlab-ce-124bad7bd88e7c329583ec3757eb0ba5fcec66e6.tar.gz |
Use stub_rails_env for Rails.env stubbing66966-convert-rails-env-stub-usages-to-use-railshelpers-stub_rails_env-instead
RailsHelpers.stub_rails_env takes care of
stubbing Rails.env
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/help_pages_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/user_can_display_performance_bar_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/features/help_pages_spec.rb b/spec/features/help_pages_spec.rb index bcd2b90d3bb..88a7aa51326 100644 --- a/spec/features/help_pages_spec.rb +++ b/spec/features/help_pages_spec.rb @@ -58,7 +58,7 @@ describe 'Help Pages' do before do stub_application_setting(version_check_enabled: true) - allow(Rails.env).to receive(:production?).and_return(true) + stub_rails_env('production') allow(VersionCheck).to receive(:url).and_return('/version-check-url') sign_in(create(:user)) diff --git a/spec/features/user_can_display_performance_bar_spec.rb b/spec/features/user_can_display_performance_bar_spec.rb index 154e948015f..8b3f193f418 100644 --- a/spec/features/user_can_display_performance_bar_spec.rb +++ b/spec/features/user_can_display_performance_bar_spec.rb @@ -37,7 +37,7 @@ describe 'User can display performance bar', :js do shared_examples 'performance bar is enabled by default in development' do before do - allow(Rails.env).to receive(:development?).and_return(true) + stub_rails_env('development') end it 'shows the performance bar by default' do |