lib/pact/shared/request.rb in pact-1.1.0.rc2 vs lib/pact/shared/request.rb in pact-1.1.0.rc3
- old
+ new
@@ -27,18 +27,18 @@
def as_json options = {}
to_hash
end
def to_hash
- base_json = {
+ hash = {
method: method,
path: path,
}
- base_json.merge!(body: body) unless body.is_a? self.class.key_not_found.class
- base_json.merge!(headers: headers) unless headers.is_a? self.class.key_not_found.class
- base_json.merge!(query: query) unless query.is_a? self.class.key_not_found.class
- base_json
+ hash.merge!(query: query) unless query.is_a? self.class.key_not_found.class
+ hash.merge!(headers: headers) unless headers.is_a? self.class.key_not_found.class
+ hash.merge!(body: body) unless body.is_a? self.class.key_not_found.class
+ hash
end
def method_and_path
"#{method.upcase} #{path}"
end
\ No newline at end of file