minitest-snapshots 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -10
- data/lib/minitest/snapshots/assertion_extensions.rb +14 -8
- data/lib/minitest/snapshots/serializer.rb +66 -0
- data/lib/minitest/snapshots/test_extensions.rb +14 -6
- data/lib/minitest/snapshots/version.rb +1 -1
- data/lib/minitest/snapshots.rb +13 -2
- data/lib/minitest/snapshots_plugin.rb +7 -7
- metadata +20 -49
- data/.gitignore +0 -8
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -6
- data/Gemfile.lock +0 -20
- data/Rakefile +0 -2
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/minitest-snapshots.gemspec +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bed43934d93c4818c27cfd55600fab8767b2d4198da07575b3f8404d9edd234
|
4
|
+
data.tar.gz: c025cd5b1feb65a29f5fe5829c8eef36de54aa6b116b96d99c919757c9c032f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b5837b513ce6f00a104884224f0da6f90b0aa7ff07a3aed3ea3488e60728d701295ea11209ea5817896428a9dd95cb0caae2aa92ab01ae0d251a232cde25380
|
7
|
+
data.tar.gz: 8580ed083254bf074a32a5e035b552428896eb5cc4cc3127e79bf63f8388e8fbb466933819476b7d45cec78bf598184ae5eae1a6fcb15201f314d312f522379b
|
data/README.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
# Minitest::Snapshots
|
2
2
|
|
3
|
-
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/minitest-snapshots.svg)](https://rubygems.org/gems/minitest-snapshots)
|
4
|
+
[![CI](https://github.com/mattbrictson/gem/actions/workflows/ci.yml/badge.svg)](https://github.com/mattbrictson/gem/actions/workflows/ci.yml)
|
5
|
+
|
6
|
+
Simple minitest plugin gem implementing Jest-style snapshot testing. It's like VCR, but for any value.
|
7
|
+
|
8
|
+
## Requirements
|
9
|
+
|
10
|
+
- Ruby 2.7 or later
|
4
11
|
|
5
12
|
## Usage
|
6
13
|
|
@@ -10,16 +17,21 @@ Example:
|
|
10
17
|
|
11
18
|
```ruby
|
12
19
|
class QueryCompilerText extends Minitest::Test
|
13
|
-
|
14
|
-
|
15
|
-
|
20
|
+
def test_it_can_compile_a_query
|
21
|
+
assert_matches_snapshot QueryCompiler.new.compile
|
22
|
+
end
|
16
23
|
end
|
17
24
|
```
|
18
25
|
|
19
26
|
## Command line options
|
20
27
|
|
21
|
-
|
22
|
-
|
28
|
+
- `-u` or `--update-snapshots`: Update snapshots on disk to the new actual value when re-running the test. Useful when you know the new output of a test case is correct and the snapshot is out of date.
|
29
|
+
- `-l` or `--lock-snapshots`: Prevents new snapshots from being written. Useful on CI to ensure all snapshots have been written by the developer.
|
30
|
+
|
31
|
+
For example, to update snapshots on a Rails project:
|
32
|
+
|
33
|
+
$ bin/rails test -u
|
34
|
+
|
23
35
|
## Installation
|
24
36
|
|
25
37
|
Add this line to your application's Gemfile:
|
@@ -36,7 +48,6 @@ Or install it yourself as:
|
|
36
48
|
|
37
49
|
$ gem install minitest-snapshots
|
38
50
|
|
39
|
-
|
40
51
|
## Development
|
41
52
|
|
42
53
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -45,12 +56,12 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
45
56
|
|
46
57
|
## Contributing
|
47
58
|
|
48
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
59
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/mattbrictson/minitest-snapshots.
|
49
60
|
|
50
61
|
## License
|
51
62
|
|
52
|
-
The gem is available as open source under the terms of the [MIT License](
|
63
|
+
The gem is available as open source under the terms of the [MIT License](LICENSE.txt).
|
53
64
|
|
54
65
|
## Code of Conduct
|
55
66
|
|
56
|
-
Everyone interacting in the
|
67
|
+
Everyone interacting in the this project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](CODE_OF_CONDUCT.md).
|
@@ -1,22 +1,28 @@
|
|
1
|
+
require_relative "serializer"
|
1
2
|
require "fileutils"
|
2
3
|
|
3
4
|
module Minitest
|
4
5
|
module Assertions
|
5
|
-
def assert_matches_snapshot(
|
6
|
-
snapshot_file = snapshot_path(self.class.name
|
6
|
+
def assert_matches_snapshot(value, snapshot_name = nil)
|
7
|
+
snapshot_file = snapshot_path(self.class.name, snapshot_name || (@snapshot_assertion_counter += 1))
|
8
|
+
snapshot = Minitest::Snapshots::Serializer.serialize(value)
|
7
9
|
|
8
10
|
if !Minitest::Snapshots.force_updates && File.exist?(snapshot_file)
|
9
|
-
assert_equal
|
11
|
+
assert_equal(
|
12
|
+
File.read(snapshot_file),
|
13
|
+
snapshot,
|
14
|
+
"The value does not match the snapshot (located at #{snapshot_file})"
|
15
|
+
)
|
10
16
|
else
|
11
17
|
if Minitest::Snapshots.lock_snapshots
|
12
|
-
assert
|
18
|
+
assert(
|
19
|
+
false,
|
20
|
+
"Attempt to create a snapshot failed because writing is prevented by the --lock-snapshots option"
|
21
|
+
)
|
13
22
|
end
|
14
23
|
|
15
24
|
FileUtils.mkdir_p(File.dirname(snapshot_file))
|
16
|
-
|
17
|
-
File.open(snapshot_file, "w") do |file|
|
18
|
-
file.write(string)
|
19
|
-
end
|
25
|
+
File.write(snapshot_file, snapshot)
|
20
26
|
end
|
21
27
|
end
|
22
28
|
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require "set"
|
2
|
+
require "yaml"
|
3
|
+
|
4
|
+
module Minitest
|
5
|
+
module Snapshots
|
6
|
+
# The serializer translates values (objects) into strings. By default,
|
7
|
+
# it uses YAML (Psych). Can be overridden to implement custom
|
8
|
+
# serialization formats, e.g.:
|
9
|
+
#
|
10
|
+
# module Minitest::Snapshots::Serializer
|
11
|
+
# def self.serialize(value)
|
12
|
+
# Marshal.dump(value)
|
13
|
+
# end
|
14
|
+
# end
|
15
|
+
module Serializer
|
16
|
+
# The name of the method used to customize the output of +to_yaml+.
|
17
|
+
# Used to provide canonical representations for Hash and Set instances.
|
18
|
+
HOOK = :encode_with
|
19
|
+
|
20
|
+
# Used to ensure the addition/removal of hooks is atomic
|
21
|
+
@lock = Mutex.new
|
22
|
+
|
23
|
+
# Serialize the supplied value to YAML with hooks to canonicalize
|
24
|
+
# (i.e. sort) Hash keys and Set elements.
|
25
|
+
#
|
26
|
+
# h1 = { foo: "bar", baz: "quux" }
|
27
|
+
# h2 = { baz: "quux", foo: "bar" }
|
28
|
+
#
|
29
|
+
# h1.to_yaml == h2.to_yaml # => false
|
30
|
+
# Serializer.serialize(h1) == Serializer.serialize(h2) # => true
|
31
|
+
#
|
32
|
+
# The hooks are only installed for the duration of the method call
|
33
|
+
# and are not installed if custom hooks are already defined.
|
34
|
+
def self.serialize(value)
|
35
|
+
@lock.synchronize do
|
36
|
+
if (hook_hash = hook?(Hash))
|
37
|
+
Hash.define_method(HOOK) do |coder|
|
38
|
+
sorted = sort_by { |pair| pair.first.to_yaml }.to_h
|
39
|
+
coder.map = dup.clear.merge!(sorted)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
if (hook_set = hook?(Set))
|
44
|
+
Set.define_method(HOOK) do |coder|
|
45
|
+
sorted = sort_by(&:to_yaml)
|
46
|
+
coder.seq = dup.clear.merge(sorted)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
value.to_yaml
|
51
|
+
ensure
|
52
|
+
Hash.remove_method(HOOK) if hook_hash
|
53
|
+
Set.remove_method(HOOK) if hook_set
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# Returns true if a class is hookable (doesn't already have a YAML
|
58
|
+
# serialization hook defined), false otherwise
|
59
|
+
def self.hook?(mod)
|
60
|
+
!(mod.method_defined?(HOOK) || mod.private_method_defined?(HOOK))
|
61
|
+
end
|
62
|
+
|
63
|
+
private_class_method :hook?
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -6,17 +6,25 @@ module Minitest
|
|
6
6
|
def before_setup
|
7
7
|
super
|
8
8
|
@snapshot_assertion_counter = 0
|
9
|
-
@snapshot_dir ||=
|
10
|
-
Rails.root.join("test", "snapshots").to_s
|
11
|
-
else
|
12
|
-
FileUtils.pwd
|
13
|
-
end
|
9
|
+
@snapshot_dir ||= Minitest::Snapshots.default_snapshots_directory
|
14
10
|
end
|
15
11
|
|
16
12
|
private
|
17
13
|
|
14
|
+
def sanitize(name)
|
15
|
+
sanitized = name.to_s.downcase.gsub(/(?:\A[\W_]+)|(?:[\W_]+\z)/, "").gsub(/[\W_]+/, "_")
|
16
|
+
|
17
|
+
if sanitized.empty?
|
18
|
+
raise NameError, "Can't sanitize name: #{name.inspect}"
|
19
|
+
end
|
20
|
+
|
21
|
+
sanitized
|
22
|
+
end
|
23
|
+
|
18
24
|
def snapshot_path(suite_name, snapshot_name)
|
19
|
-
|
25
|
+
filename = format("%s__%s.snap.yaml", sanitize(name), sanitize(snapshot_name))
|
26
|
+
subdir = sanitize(suite_name)
|
27
|
+
File.join(@snapshot_dir, subdir, filename)
|
20
28
|
end
|
21
29
|
end
|
22
30
|
end
|
data/lib/minitest/snapshots.rb
CHANGED
@@ -2,7 +2,18 @@ require "minitest"
|
|
2
2
|
|
3
3
|
module Minitest::Snapshots
|
4
4
|
class << self
|
5
|
-
attr_accessor :force_updates
|
6
|
-
|
5
|
+
attr_accessor :force_updates, :lock_snapshots
|
6
|
+
|
7
|
+
def default_snapshots_directory
|
8
|
+
if defined?(Rails) && Rails.respond_to?(:root)
|
9
|
+
Rails.root.join("test", "snapshots").to_s
|
10
|
+
elsif Dir.exist?("test")
|
11
|
+
File.expand_path("test/snapshots")
|
12
|
+
elsif Dir.exist?("spec")
|
13
|
+
File.expand_path("spec/snapshots")
|
14
|
+
else
|
15
|
+
File.expand_path("snapshots")
|
16
|
+
end
|
17
|
+
end
|
7
18
|
end
|
8
19
|
end
|
@@ -1,7 +1,8 @@
|
|
1
|
-
|
1
|
+
require_relative "snapshots"
|
2
|
+
require_relative "snapshots/version"
|
2
3
|
|
3
4
|
module Minitest
|
4
|
-
def self.plugin_snapshots_options(opts,
|
5
|
+
def self.plugin_snapshots_options(opts, _options)
|
5
6
|
opts.on "-u", "--update-snapshots", "Update (overwrite) stored snapshots" do
|
6
7
|
Minitest::Snapshots.force_updates = true
|
7
8
|
end
|
@@ -11,10 +12,9 @@ module Minitest
|
|
11
12
|
end
|
12
13
|
end
|
13
14
|
|
14
|
-
def self.plugin_snapshots_init(
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
Minitest::Test.send :include, Minitest::Snapshots::TestExtensions
|
15
|
+
def self.plugin_snapshots_init(_options)
|
16
|
+
require_relative "snapshots/test_extensions"
|
17
|
+
require_relative "snapshots/assertion_extensions"
|
18
|
+
Minitest::Test.include Minitest::Snapshots::TestExtensions
|
19
19
|
end
|
20
20
|
end
|
metadata
CHANGED
@@ -1,70 +1,42 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-snapshots
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harry Brundage
|
8
|
-
|
8
|
+
- Matt Brictson
|
9
|
+
autorequire:
|
9
10
|
bindir: exe
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
|
14
|
-
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.17'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.17'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '10.0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '10.0'
|
41
|
-
description:
|
12
|
+
date: 2023-06-30 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description:
|
42
15
|
email:
|
43
16
|
- harry.brundage@gmail.com
|
17
|
+
- opensource@mattbrictson.com
|
44
18
|
executables: []
|
45
19
|
extensions: []
|
46
20
|
extra_rdoc_files: []
|
47
21
|
files:
|
48
|
-
- ".gitignore"
|
49
|
-
- CODE_OF_CONDUCT.md
|
50
|
-
- Gemfile
|
51
|
-
- Gemfile.lock
|
52
22
|
- LICENSE.txt
|
53
23
|
- README.md
|
54
|
-
- Rakefile
|
55
|
-
- bin/console
|
56
|
-
- bin/setup
|
57
24
|
- lib/minitest/snapshots.rb
|
58
25
|
- lib/minitest/snapshots/assertion_extensions.rb
|
26
|
+
- lib/minitest/snapshots/serializer.rb
|
59
27
|
- lib/minitest/snapshots/test_extensions.rb
|
60
28
|
- lib/minitest/snapshots/version.rb
|
61
29
|
- lib/minitest/snapshots_plugin.rb
|
62
|
-
|
63
|
-
homepage: https://github.com/superpro-inc/minitest-snapshots
|
30
|
+
homepage: https://github.com/mattbrictson/minitest-snapshots
|
64
31
|
licenses:
|
65
32
|
- MIT
|
66
|
-
metadata:
|
67
|
-
|
33
|
+
metadata:
|
34
|
+
bug_tracker_uri: https://github.com/mattbrictson/minitest-snapshots/issues
|
35
|
+
changelog_uri: https://github.com/mattbrictson/minitest-snapshots/releases
|
36
|
+
source_code_uri: https://github.com/mattbrictson/minitest-snapshots
|
37
|
+
homepage_uri: https://github.com/mattbrictson/minitest-snapshots
|
38
|
+
rubygems_mfa_required: 'true'
|
39
|
+
post_install_message:
|
68
40
|
rdoc_options: []
|
69
41
|
require_paths:
|
70
42
|
- lib
|
@@ -72,16 +44,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
72
44
|
requirements:
|
73
45
|
- - ">="
|
74
46
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
47
|
+
version: '2.7'
|
76
48
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
49
|
requirements:
|
78
50
|
- - ">="
|
79
51
|
- !ruby/object:Gem::Version
|
80
52
|
version: '0'
|
81
53
|
requirements: []
|
82
|
-
rubygems_version: 3.
|
83
|
-
signing_key:
|
54
|
+
rubygems_version: 3.4.13
|
55
|
+
signing_key:
|
84
56
|
specification_version: 4
|
85
|
-
summary:
|
86
|
-
the filesystem.
|
57
|
+
summary: Minitest plugin implementing Jest-style snapshot testing
|
87
58
|
test_files: []
|
data/.gitignore
DELETED
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at harry.brundage@gmail.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
minitest-snapshots (0.3.0)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
rake (10.5.0)
|
10
|
-
|
11
|
-
PLATFORMS
|
12
|
-
ruby
|
13
|
-
|
14
|
-
DEPENDENCIES
|
15
|
-
bundler (~> 1.17)
|
16
|
-
minitest-snapshots!
|
17
|
-
rake (~> 10.0)
|
18
|
-
|
19
|
-
BUNDLED WITH
|
20
|
-
1.17.2
|
data/Rakefile
DELETED
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "minitest/snapshots"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/minitest-snapshots.gemspec
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require "minitest/snapshots/version"
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "minitest-snapshots"
|
8
|
-
spec.version = Minitest::Snapshots::VERSION
|
9
|
-
spec.authors = ["Harry Brundage"]
|
10
|
-
spec.email = ["harry.brundage@gmail.com"]
|
11
|
-
|
12
|
-
spec.summary = %q{Adds jest style snapshot testing asserting against long values stored on the filesystem.}
|
13
|
-
spec.homepage = "https://github.com/superpro-inc/minitest-snapshots"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
# Specify which files should be added to the gem when it is released.
|
17
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
|
-
spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
|
19
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
-
end
|
21
|
-
spec.bindir = "exe"
|
22
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
-
spec.require_paths = ["lib"]
|
24
|
-
|
25
|
-
spec.add_development_dependency "bundler", "~> 1.17"
|
26
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
-
end
|