diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 2a20c709e9..18a78ac5fb 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -31,8 +31,8 @@ class AssetHostTest < ApplicationHelperTest attr_reader :request test 'asset host is not configured' do - Rails.configuration.asset_host = nil - Rails.configuration.three_scale.asset_host = @asset_host + Rails.configuration.expects(:asset_host).returns(nil) + Rails.configuration.three_scale.expects(:asset_host).returns(@asset_host) result = rails_asset_host_url @@ -40,8 +40,8 @@ class AssetHostTest < ApplicationHelperTest end test "asset host is configured but it's value is empty" do - Rails.configuration.asset_host = -> {} - Rails.configuration.three_scale.asset_host = '' + Rails.configuration.expects(:asset_host).returns(-> {}) + Rails.configuration.three_scale.expects(:asset_host).returns('') result = rails_asset_host_url @@ -49,8 +49,8 @@ class AssetHostTest < ApplicationHelperTest end test 'asset host is configured and has a proper value' do - Rails.configuration.asset_host = -> {} - Rails.configuration.three_scale.asset_host = @asset_host + Rails.configuration.expects(:asset_host).returns(-> {}) + Rails.configuration.three_scale.expects(:asset_host).returns(@asset_host) result = rails_asset_host_url