diff --git a/Gemfile b/Gemfile index db59552d2..96d56bec6 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ group :test do gem 'thor' gem 'minitest', '~> 5.18' gem 'simplecov' - gem 'mocha', "~> 2.1.0" + gem 'mocha', '>= 2.8', '< 4' gem 'ci_reporter_minitest', "~> 1.0.0", :require => false end diff --git a/lib/hammer_cli_foreman/testing/api_expectations.rb b/lib/hammer_cli_foreman/testing/api_expectations.rb index 43b25ea0e..5f7dded39 100644 --- a/lib/hammer_cli_foreman/testing/api_expectations.rb +++ b/lib/hammer_cli_foreman/testing/api_expectations.rb @@ -6,7 +6,9 @@ def self.api_calls @api_calls ||= [] end - class APICallMatcher < Mocha::ParameterMatchers::Base + class APICallMatcher + include Mocha::ParameterMatchers::BaseMethods + attr_accessor :expected_params, :expected_resource, :expected_action, :block def initialize(resource=nil, action=nil, &block)