rspec-request_snapshot 0.7.2 → 0.7.3

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: 41844300d124b15cfdb8ce673dc2b1b13b5cf322
4
- data.tar.gz: 92c3e2cd860b696a4f2d2970ea9d05970d27e8f1
3
+ metadata.gz: 4d3d51ce60225b5fb9350a498a47186224232f33
4
+ data.tar.gz: f0d06841fa90e16a98711d4b43e49c5ea99bb656
5
5
  SHA512:
6
- metadata.gz: fb3d639fb20be49514a9f700f7b1091f4b3e5a80b4525b87d2734f8aba2b896b948ee783937f373cafeba6b60bfc27d5cecaa13cd376cb7c9f056565cccb00df
7
- data.tar.gz: 783f99bcbcbc45f2ff5ecc440ccfcc42c43e17c15b5f65d2f7fee305780c771e1d39daacc500e95e9d0c950c4e15dedff9b0c02704c9838a0979b1597da9edbd
6
+ metadata.gz: bca3f238a3d285d9e99a0dd99ac413ca972046ca6d45fdf866de548c0deb2848012ada961667ad75b546eda77cddcf82c62a9753870a1bb3b961b7f1faa36a34
7
+ data.tar.gz: 8ed29b8c907415df8ef32a63bc802b3900c46b96e9ef5d833d8eef82e30154212aa4d12ce9a22b00598e5cd60b9a223197aec95976c7a7778c8a38aa4efda5e0
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.7.3]
4
+
5
+ ### Added
6
+ - Added BLOCK_CREATE_SNAPSHOTS flag
7
+
3
8
  ## [v0.7.2]
4
9
 
5
10
  ### Fixed
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-request_snapshot (0.7.2)
4
+ rspec-request_snapshot (0.7.3)
5
5
  rspec (~> 3.0)
6
6
 
7
7
  GEM
@@ -12,19 +12,19 @@ GEM
12
12
  docile (1.3.1)
13
13
  json (2.1.0)
14
14
  rake (10.5.0)
15
- rspec (3.8.0)
16
- rspec-core (~> 3.8.0)
17
- rspec-expectations (~> 3.8.0)
18
- rspec-mocks (~> 3.8.0)
19
- rspec-core (3.8.1)
20
- rspec-support (~> 3.8.0)
21
- rspec-expectations (3.8.4)
15
+ rspec (3.9.0)
16
+ rspec-core (~> 3.9.0)
17
+ rspec-expectations (~> 3.9.0)
18
+ rspec-mocks (~> 3.9.0)
19
+ rspec-core (3.9.0)
20
+ rspec-support (~> 3.9.0)
21
+ rspec-expectations (3.9.0)
22
22
  diff-lcs (>= 1.2.0, < 2.0)
23
- rspec-support (~> 3.8.0)
24
- rspec-mocks (3.8.1)
23
+ rspec-support (~> 3.9.0)
24
+ rspec-mocks (3.9.0)
25
25
  diff-lcs (>= 1.2.0, < 2.0)
26
- rspec-support (~> 3.8.0)
27
- rspec-support (3.8.2)
26
+ rspec-support (~> 3.9.0)
27
+ rspec-support (3.9.0)
28
28
  simplecov (0.16.1)
29
29
  docile (~> 1.1)
30
30
  json (>= 1.8, < 3)
data/README.md CHANGED
@@ -64,6 +64,10 @@ If you only need to add, remove or replace data without replacing the whole snap
64
64
  **Note:** Conservative update will not work along with ignore_order option. It should only be used when there is
65
65
  no major changes in the snapshots that will be updated.
66
66
 
67
+ If you want tests to fail in case a snapshot file does not exist (ie: when running on a CI):
68
+
69
+ BLOCK_CREATE_SNAPSHOTS=true bundle exec rspec
70
+
67
71
  ### Matcher
68
72
 
69
73
  ```ruby
@@ -21,6 +21,7 @@ module Rspec::RequestSnapshot
21
21
 
22
22
  handler.compare(@actual, @expected)
23
23
  else
24
+ return false if ENV["BLOCK_CREATE_SNAPSHOTS"] == "true"
24
25
  File.write(snapshot_file_path, handler.writable(actual))
25
26
  true
26
27
  end
@@ -3,7 +3,7 @@
3
3
  # rubocop:disable Style/ClassAndModuleChildren
4
4
  module Rspec
5
5
  module RequestSnapshot
6
- VERSION = "0.7.2"
6
+ VERSION = "0.7.3"
7
7
  end
8
8
  end
9
9
  # rubocop:enable Style/ClassAndModuleChildren
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-request_snapshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Campos
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-24 00:00:00.000000000 Z
11
+ date: 2019-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec