mirror of
https://github.com/inspec/inspec
synced 2024-09-21 06:51:56 +00:00
Fixed tests to work with rspec-expectations 3.8.5+.
We were using a "private" method in our tests and they changed the signature. Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
parent
ba003ed529
commit
708a319ce8
1 changed files with 10 additions and 2 deletions
|
@ -14,8 +14,16 @@ describe "inspec matchers" do
|
|||
#
|
||||
# expect(expression).to be expected_value
|
||||
|
||||
def rspec_expect(value, &block)
|
||||
::RSpec::Expectations::ExpectationTarget.for(value, block)
|
||||
if ::RSpec::Expectations::ExpectationTarget.method(:for).arity == 1
|
||||
# rspec-expectations 3.8.5+
|
||||
def rspec_expect(value, &block)
|
||||
::RSpec::Expectations::ExpectationTarget.for(value, &block)
|
||||
end
|
||||
else
|
||||
# rspec-expectations 3.8.4-
|
||||
def rspec_expect(value, &block)
|
||||
::RSpec::Expectations::ExpectationTarget.for(value, block)
|
||||
end
|
||||
end
|
||||
|
||||
##
|
||||
|
|
Loading…
Reference in a new issue