pact-support 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4cf5825accbe433ede480455c3b665e664b590eb
4
- data.tar.gz: 4ab036036ff9921237a7abe04c42a4cc51047347
3
+ metadata.gz: c6011a979ee41a74c84ff53727a675089c3278c6
4
+ data.tar.gz: 18ab072a5b58bb69d13e0814fda0652f36820b3b
5
5
  SHA512:
6
- metadata.gz: 528365fd336a41546452e2793ed7d9b7931d71b63c3675962a1115de03055284977d36c0902f8b31d9ea5ecdaf7233e33b5d0fa9d41030744e0885754c154972
7
- data.tar.gz: d7fc2ab5af322a70bb84a253f841f98c961274713c349b16055f69ff121834ad1ed3b822f1d4ce858f9fbe4e7871df24afde95253e3c6a996c58cc3ed4f9f9eb
6
+ metadata.gz: 3473ea8471e9d9fe92d560f6553ec564624e2bff1d06db46e7eca79ed679503753e5d47eb82de4197cebfba87a9a7efd32758dea85190ee11adfb185eb482a1a
7
+ data.tar.gz: e68d4fe6e17e256ffa6cba10fd04a9b5e8a26249d3a9046a4b2e5ebd8f180e639724eb120b9b23ecde9a7c53635e23cd54debdc51b12825846aba58036a8c40e
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@ Do this to generate your change history
2
2
 
3
3
  git log --pretty=format:' * %h - %s (%an, %ad)'
4
4
 
5
+ ### 0.4.4 (9 July 2015)
6
+
7
+ * 6d9be6e - Create no rules for exact matching (Beth Skurrie, Thu Jul 9 14:28:56 2015 +1000)
8
+
5
9
  ### 0.4.3 (7 July 2015)
6
10
 
7
11
  * cf99e97 - Handle nils when symbolizing keys in a hash (Beth Skurrie, Tue Jul 7 11:52:50 2015 +1000)
@@ -70,7 +70,7 @@ module Pact
70
70
  end
71
71
 
72
72
  def record_match_type_rule path, match_type
73
- unless match_type == :array_like
73
+ unless match_type == :array_like || match_type.nil?
74
74
  rules[path] ||= {}
75
75
  rules[path]['match'] = match_type
76
76
  end
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module Support
3
- VERSION = "0.4.3"
3
+ VERSION = "0.4.4"
4
4
  end
5
5
  end
@@ -21,11 +21,10 @@ module Pact
21
21
  let(:rules) do
22
22
  {
23
23
  "$.body.foo" => {"match" => "type"},
24
- "$.body.alligator.name" => {"match" => "type"},
24
+ "$.body.alligator.name" => {"match" => "type"}
25
25
  }
26
26
  end
27
27
 
28
-
29
28
  it "creates a rule that matches by type" do
30
29
  expect(subject).to eq rules
31
30
  end
@@ -48,7 +47,6 @@ module Pact
48
47
  }
49
48
  end
50
49
 
51
-
52
50
  it "creates a rule that matches by regex" do
53
51
  expect(subject).to eq rules
54
52
  end
@@ -71,7 +69,6 @@ module Pact
71
69
  }
72
70
  end
73
71
 
74
-
75
72
  it "the match:regex overrides the match:type" do
76
73
  expect(subject).to eq rules
77
74
  end
@@ -148,6 +145,23 @@ module Pact
148
145
  expect(subject).to eq rules
149
146
  end
150
147
  end
148
+
149
+ context "with no special matching" do
150
+ let(:matchable) do
151
+ {
152
+ body: { alligator: { name: 'Mary' } }
153
+ }
154
+ end
155
+
156
+ let(:rules) do
157
+ {}
158
+ end
159
+
160
+
161
+ it "does not create any rules" do
162
+ expect(subject).to eq rules
163
+ end
164
+ end
151
165
  end
152
166
  end
153
167
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Fraser
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-07-07 00:00:00.000000000 Z
15
+ date: 2015-07-09 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: randexp