snapshot_testing 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/__snapshots__/minitest.rb.snap +4 -4
- data/examples/__snapshots__/rspec.rb.snap +2 -2
- data/examples/__snapshots__/test_unit.rb.snap +2 -2
- data/lib/snapshot_testing/recorder.rb +7 -2
- data/lib/snapshot_testing/version.rb +1 -1
- data/snapshot_testing.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26bd438aaed8bb5b446ab754e9cf1cc68f4ec69c85b90686c10d1c704231c036
|
4
|
+
data.tar.gz: dd2e8a207d362121cd158dda69b71b80e2542377634daf26f7c9cb69c319b29f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a4b44606c27cfada6173f539e7f2614b725d03bb6a3c79ec3602073860bcc690612a1f6d0061438894529b218a8d2aaa87f041e1a085f1ddeb49582a8bc3c73
|
7
|
+
data.tar.gz: 85fc59d0aa33d4a0e0726c563e36756ab55a4c6bfa36888e731ebf268a68c987adf649600470ebd443b76f92bbde1ed98e2891519639c72281fc4f91920f20b3
|
@@ -1,15 +1,15 @@
|
|
1
|
-
snapshots["test_0001_takes a snapshot 1"] =
|
1
|
+
snapshots["test_0001_takes a snapshot 1"] = <<-SNAP
|
2
2
|
hello
|
3
3
|
SNAP
|
4
4
|
|
5
|
-
snapshots["test_0001_takes a snapshot 2"] =
|
5
|
+
snapshots["test_0001_takes a snapshot 2"] = <<-SNAP
|
6
6
|
goodbye
|
7
7
|
SNAP
|
8
8
|
|
9
|
-
snapshots["test_snapshot 1"] =
|
9
|
+
snapshots["test_snapshot 1"] = <<-SNAP
|
10
10
|
hello
|
11
11
|
SNAP
|
12
12
|
|
13
|
-
snapshots["test_snapshot 2"] =
|
13
|
+
snapshots["test_snapshot 2"] = <<-SNAP
|
14
14
|
goodbye
|
15
15
|
SNAP
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require "fileutils"
|
2
|
-
require "pastel"
|
3
2
|
|
4
3
|
module SnapshotTesting
|
5
4
|
class Recorder
|
@@ -65,7 +64,13 @@ module SnapshotTesting
|
|
65
64
|
def log(count, status, color)
|
66
65
|
label = count == 1 ? "snapshot" : "snapshots"
|
67
66
|
message = "#{count} #{label} #{status}."
|
68
|
-
|
67
|
+
|
68
|
+
case color
|
69
|
+
when :yellow
|
70
|
+
warn "\e[33m#{message}\e[0m"
|
71
|
+
when :green
|
72
|
+
warn "\e[32m#{message}\e[0m"
|
73
|
+
end
|
69
74
|
end
|
70
75
|
|
71
76
|
def write(snapshots)
|
data/snapshot_testing.gemspec
CHANGED
@@ -23,7 +23,6 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.required_ruby_version = '>= 2.4.0'
|
25
25
|
|
26
|
-
spec.add_dependency "pastel", "~> 0.7"
|
27
26
|
spec.add_development_dependency "bundler", "~> 2.0"
|
28
27
|
spec.add_development_dependency "rake", "~> 10.0"
|
29
28
|
spec.add_development_dependency "rspec", "~> 3.0"
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snapshot_testing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ray Zane
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: pastel
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.7'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0.7'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: bundler
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|