pact 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
### 1.0.9 (16 September 2013)
|
2
|
+
|
3
|
+
* Fixing pretty generate of json [Beth Skurrie]
|
4
|
+
* Fixed missing require [Beth Skurrie]
|
5
|
+
|
1
6
|
### 1.0.8 (13 September 2013)
|
2
7
|
|
3
8
|
* Added validation to ensure that a Term has both a matcher and a generate value, and that the value to generate matches the given regular expression [Beth Skurrie]
|
data/Gemfile.lock
CHANGED
data/lib/pact/version.rb
CHANGED
@@ -16,7 +16,7 @@ module Pact
|
|
16
16
|
yield
|
17
17
|
ensure
|
18
18
|
$VERBOSE = old_verbose
|
19
|
-
end
|
19
|
+
end
|
20
20
|
|
21
21
|
before do
|
22
22
|
@backup_version = Pact::VERSION
|
@@ -156,7 +156,25 @@ module Pact
|
|
156
156
|
describe "update_pactfile" do
|
157
157
|
let(:pacts_dir) { Pathname.new("./tmp/pactfiles") }
|
158
158
|
let(:expected_pact_path) { pacts_dir + "test_consumer-test_service.json" }
|
159
|
-
let(:expected_pact_string)
|
159
|
+
let(:expected_pact_string) do <<-eos
|
160
|
+
{
|
161
|
+
"provider": {
|
162
|
+
"name": "test_service"
|
163
|
+
},
|
164
|
+
"consumer": {
|
165
|
+
"name": "test_consumer"
|
166
|
+
},
|
167
|
+
"interactions": [
|
168
|
+
"something"
|
169
|
+
],
|
170
|
+
"metadata": {
|
171
|
+
"pact_gem": {
|
172
|
+
"version": "#{Pact::VERSION}"
|
173
|
+
}
|
174
|
+
}
|
175
|
+
}
|
176
|
+
eos
|
177
|
+
end
|
160
178
|
let(:consumer) { Pact::ServiceConsumer.new(:name => 'test_consumer')}
|
161
179
|
let(:provider) { Pact::ServiceProvider.new(:name => 'test_service')}
|
162
180
|
let(:interactions) { [double("interaction", as_json: "something")]}
|
@@ -165,7 +183,6 @@ module Pact
|
|
165
183
|
Pact.configuration.stub(:pact_dir).and_return(Pathname.new("./tmp/pactfiles"))
|
166
184
|
FileUtils.rm_rf pacts_dir
|
167
185
|
FileUtils.mkdir_p pacts_dir
|
168
|
-
JSON.should_receive(:pretty_generate).with(instance_of(Pact::ConsumerContract)).and_return(expected_pact_string)
|
169
186
|
subject.update_pactfile
|
170
187
|
end
|
171
188
|
|
@@ -174,7 +191,7 @@ module Pact
|
|
174
191
|
end
|
175
192
|
|
176
193
|
it "should write the interactions to the file" do
|
177
|
-
File.read(expected_pact_path).should eql expected_pact_string
|
194
|
+
File.read(expected_pact_path).should eql expected_pact_string.strip
|
178
195
|
end
|
179
196
|
end
|
180
197
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2013-09-
|
16
|
+
date: 2013-09-18 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: randexp
|