lib/soaspec/matchers.rb in soaspec-0.2.8 vs lib/soaspec/matchers.rb in soaspec-0.2.9

- old
+ new

@@ -1,6 +1,5 @@ - require_relative 'core_ext/hash' require_relative 'not_found_errors' # Whether response has any element with the provided value RSpec::Matchers.define :contain_value do |expected| @@ -59,11 +58,10 @@ end RSpec::Matchers.alias_matcher :have_jsonpath_value, :have_xpath_value RSpec::Matchers.define :be_found do - match do |exchange| expect(exchange.exchange_handler.found?(exchange.response)).to be true end failure_message do |exchange| @@ -89,8 +87,9 @@ end exchange.exchange_handler.expected_mandatory_json_values.each do |path, value| failure_list << "Expected value at json '#{path}' to be '#{value}' but was '#{exchange[path]}'" unless exchange[path] == value end raise failure_list.to_s unless failure_list.empty? + true end end