diff --git a/.rubocop.yml b/.rubocop.yml index 6dcfe055..8d6807f0 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -156,8 +156,6 @@ Performance/InefficientHashSearch: Performance/OpenStruct: Enabled: true - Exclude: - - spec/**/* Performance/RangeInclude: Enabled: true diff --git a/spec/delayed/backend/test.rb b/spec/delayed/backend/test.rb index 43c994cd..e02e0956 100644 --- a/spec/delayed/backend/test.rb +++ b/spec/delayed/backend/test.rb @@ -1,4 +1,3 @@ -require 'ostruct' require 'delayed_job' require 'delayed/backend/base' diff --git a/spec/rollbar_spec.rb b/spec/rollbar_spec.rb index 6f84fe7a..447b30b0 100644 --- a/spec/rollbar_spec.rb +++ b/spec/rollbar_spec.rb @@ -7,7 +7,6 @@ require 'active_support/json/encoding' require 'rollbar/item' -require 'ostruct' require 'spec_helper' @@ -242,7 +241,7 @@ notifier.configuration = configuration allow_any_instance_of(Net::HTTP) .to receive(:request) - .and_return(OpenStruct.new(:code => 500, :body => 'Error')) + .and_return(double(code: 500, body: 'Error')) @uri = URI.parse(Rollbar::Configuration::DEFAULT_ENDPOINT) end @@ -1518,7 +1517,7 @@ def backtrace before do allow_any_instance_of(Net::HTTP) .to receive(:request) - .and_return(OpenStruct.new(:code => 200, :body => 'Success')) + .and_return(double(code: 200, body: 'Success')) @env_vars = clear_proxy_env_vars end