spec/lib/pact/reification_spec.rb in pact-1.1.0.rc3 vs spec/lib/pact/reification_spec.rb in pact-1.1.0.rc4
- old
+ new
@@ -37,7 +37,19 @@
expect(subject[:array]).to eql ['first', 'second']
end
end
+ context "when reifying a Request" do
+
+ let(:request){ Pact::Request::Expected.from_hash(method: 'get', path: '/', body: Pact::Term.new(generate: "sunny", matcher: /sun/))}
+
+ subject { Reification.from_term(request) }
+
+ it "turns it into a hash before reifying it" do
+ expect(subject[:body]).to eq("sunny")
+ end
+
+ end
+
end
end