lib/airborne/request_expectations.rb in airborne-0.1.16 vs lib/airborne/request_expectations.rb in airborne-0.1.17

- old
+ new

@@ -54,18 +54,10 @@ def date -> (value) { yield DateTime.parse(value) } end - [:expect_json_types, :expect_json, :expect_json_keys, :expect_status, :expect_header, :expect_header_contains].each do |method_name| - method = instance_method(method_name) - define_method(method_name) do |*args, &block| - set_rails_response - method.bind(self).call(*args, &block) - end - end - private def expect_header_impl(key, content, contains = nil) header = headers[key] if header @@ -75,13 +67,9 @@ expect(header.downcase).to eq(content.downcase) end else fail RSpec::Expectations::ExpectationNotMetError, "Header #{key} not present in HTTP response" end - end - - def set_rails_response - set_response(@response) if @json_body.nil? end def call_with_path(args) if args.length == 2 get_by_path(args[0], json_body) do|json_chunk|