minitest-matchers_vaccine 1.0.2 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
 - data/LICENSE.txt +1 -1
 - data/README.md +4 -24
 - data/lib/minitest/matchers_vaccine/version.rb +1 -1
 - data/lib/minitest/matchers_vaccine.rb +2 -2
 - data/test/matchers_test.rb +10 -10
 - metadata +6 -21
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 2 
     | 
    
         
            +
            SHA256:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 05f68eff8f785354290b4e2650c607c544b5873b458e0d05724183ef8d4ed9d5
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 38f5adbc7cb1a62b6c58cdd9613281bea688df7fe35dbcee7d60efb17ec38b6a
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 8e66d1b20dc8e2438e4b447c25a442edb7c028318c56ee7eb27ce717293d6f1c1c3b4520c96575cef56f1197579def9d91054d8b2a09afe607b73a828e7f4f67
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 7edc364bb1bfa057e3eff7297bde32eccc36b9532a28b505e833aea7cdf8bb03f24a0e5a374395f211c1948b20e82be88284b1bc70da028f187bdad73c230bf7
         
     | 
    
        data/LICENSE.txt
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,6 +1,8 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # Minitest::MatchersVaccine
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            [](https://rubygems.org/gems/minitest-matchers_vaccine) 
     | 
| 
      
 3 
     | 
    
         
            +
            [](https://rubygems.org/gems/minitest-matchers_vaccine)
         
     | 
| 
      
 4 
     | 
    
         
            +
            [](https://github.com/rmm5t/minitest-matchers_vaccine/actions?query=workflow%3ACI)
         
     | 
| 
      
 5 
     | 
    
         
            +
            [](https://codeclimate.com/github/rmm5t/minitest-matchers_vaccine)
         
     | 
| 
       4 
6 
     | 
    
         | 
| 
       5 
7 
     | 
    
         
             
            Adds matcher support to minitest without all the other RSpec-style expectation
         
     | 
| 
       6 
8 
     | 
    
         
             
            _infections_.
         
     | 
| 
         @@ -18,27 +20,6 @@ gem is actually heavily inspired by and based upon the assertions in 
     | 
|
| 
       18 
20 
     | 
    
         
             
            minitest-matchers; however, everything else that minitest-matchers brings to
         
     | 
| 
       19 
21 
     | 
    
         
             
            the table is unnecessary unless you're bent on a true RSpec-style syntax.
         
     | 
| 
       20 
22 
     | 
    
         | 
| 
       21 
     | 
    
         
            -
            ## How You Can Help
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
            **If you like this project, please help. [Donate via Gittip][gittip] or [buy me a coffee with Bitcoin][bitcoin].**<br>
         
     | 
| 
       24 
     | 
    
         
            -
            [][gittip]
         
     | 
| 
       25 
     | 
    
         
            -
            [][bitcoin]
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
            **[Bitcoin][bitcoin]**: `1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m`<br>
         
     | 
| 
       28 
     | 
    
         
            -
            [![Bitcoin Donation][bitcoin-qr-small]][bitcoin-qr-big]
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
            ## Need Help?
         
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
            **You can [book a session with me on Codementor][codementor].**<br>
         
     | 
| 
       33 
     | 
    
         
            -
            [][codementor]
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
            [gittip]: https://www.gittip.com/rmm5t/ "Donate to rmm5t for open source!"
         
     | 
| 
       36 
     | 
    
         
            -
            [bitcoin]: https://blockchain.info/address/1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m "Buy rmm5t a coffee for open source!"
         
     | 
| 
       37 
     | 
    
         
            -
            [bitcoin-scheme]: bitcoin:1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m?amount=0.01&label=Coffee%20to%20rmm5t%20for%20Open%20Source "Buy rmm5t a coffee for open source!"
         
     | 
| 
       38 
     | 
    
         
            -
            [bitcoin-qr-small]: http://chart.apis.google.com/chart?cht=qr&chs=150x150&chl=bitcoin%3A1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m%3Famount%3D0.01%26label%3DCoffee%2520to%2520rmm5t%2520for%2520Open%2520Source
         
     | 
| 
       39 
     | 
    
         
            -
            [bitcoin-qr-big]: http://chart.apis.google.com/chart?cht=qr&chs=500x500&chl=bitcoin%3A1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m%3Famount%3D0.01%26label%3DCoffee%2520to%2520rmm5t%2520for%2520Open%2520Source
         
     | 
| 
       40 
     | 
    
         
            -
            [codementor]: https://www.codementor.io/rmm5t?utm_campaign=profile&utm_source=button-rmm5t&utm_medium=shields "Book a session with rmm5t on Codementor!"
         
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
23 
     | 
    
         
             
            ## Installation
         
     | 
| 
       43 
24 
     | 
    
         | 
| 
       44 
25 
     | 
    
         
             
            Add this line to your application's Gemfile:
         
     | 
| 
         @@ -130,5 +111,4 @@ The idea was originally inspired by the matcher assertions implementation in 
     | 
|
| 
       130 
111 
     | 
    
         | 
| 
       131 
112 
     | 
    
         
             
            ## License
         
     | 
| 
       132 
113 
     | 
    
         | 
| 
       133 
     | 
    
         
            -
             
     | 
| 
       134 
     | 
    
         
            -
            license](http://en.wikipedia.org/wiki/MIT_License)
         
     | 
| 
      
 114 
     | 
    
         
            +
            [MIT License](https://rmm5t.mit-license.org/)
         
     | 
| 
         @@ -38,7 +38,7 @@ module Minitest 
     | 
|
| 
       38 
38 
     | 
    
         
             
                #     must belong_to :account
         
     | 
| 
       39 
39 
     | 
    
         
             
                #     must have_many :line_items
         
     | 
| 
       40 
40 
     | 
    
         
             
                #   end
         
     | 
| 
       41 
     | 
    
         
            -
                def must(matcher, subject = @subject || subject, msg = nil)
         
     | 
| 
      
 41 
     | 
    
         
            +
                def must(matcher, subject = ((defined?(@subject) && @subject) || subject()), msg = nil)
         
     | 
| 
       42 
42 
     | 
    
         
             
                  assert_must matcher, subject, msg
         
     | 
| 
       43 
43 
     | 
    
         
             
                end
         
     | 
| 
       44 
44 
     | 
    
         | 
| 
         @@ -80,7 +80,7 @@ module Minitest 
     | 
|
| 
       80 
80 
     | 
    
         
             
                #   it "should validate" do
         
     | 
| 
       81 
81 
     | 
    
         
             
                #     wont have_valid(:email).when("foo", "foo@bar", "@bar.com")
         
     | 
| 
       82 
82 
     | 
    
         
             
                #   end
         
     | 
| 
       83 
     | 
    
         
            -
                def wont(matcher, subject = @subject || subject, msg = nil)
         
     | 
| 
      
 83 
     | 
    
         
            +
                def wont(matcher, subject = ((defined?(@subject) && @subject) || subject()), msg = nil)
         
     | 
| 
       84 
84 
     | 
    
         
             
                  assert_wont matcher, subject, msg
         
     | 
| 
       85 
85 
     | 
    
         
             
                end
         
     | 
| 
       86 
86 
     | 
    
         
             
              end
         
     | 
    
        data/test/matchers_test.rb
    CHANGED
    
    | 
         @@ -34,8 +34,8 @@ describe "#assert_must" do 
     | 
|
| 
       34 
34 
     | 
    
         
             
              include InstanceOf
         
     | 
| 
       35 
35 
     | 
    
         | 
| 
       36 
36 
     | 
    
         
             
              it "should be capable of passing" do
         
     | 
| 
       37 
     | 
    
         
            -
                 
     | 
| 
       38 
     | 
    
         
            -
                 
     | 
| 
      
 37 
     | 
    
         
            +
                assert_must(be_instance_of(Array), [:hello])
         
     | 
| 
      
 38 
     | 
    
         
            +
                assert_must(be_instance_of(String), "hello")
         
     | 
| 
       39 
39 
     | 
    
         
             
              end
         
     | 
| 
       40 
40 
     | 
    
         | 
| 
       41 
41 
     | 
    
         
             
              it "should be capable of failing" do
         
     | 
| 
         @@ -48,8 +48,8 @@ describe "#assert_wont" do 
     | 
|
| 
       48 
48 
     | 
    
         
             
              include InstanceOf
         
     | 
| 
       49 
49 
     | 
    
         | 
| 
       50 
50 
     | 
    
         
             
              it "should be capable of passing" do
         
     | 
| 
       51 
     | 
    
         
            -
                 
     | 
| 
       52 
     | 
    
         
            -
                 
     | 
| 
      
 51 
     | 
    
         
            +
                assert_wont(be_instance_of(String), [:hello])
         
     | 
| 
      
 52 
     | 
    
         
            +
                assert_wont(be_instance_of(Array), "hello")
         
     | 
| 
       53 
53 
     | 
    
         
             
              end
         
     | 
| 
       54 
54 
     | 
    
         | 
| 
       55 
55 
     | 
    
         
             
              it "should be capable of failing" do
         
     | 
| 
         @@ -65,7 +65,7 @@ describe "#must" do 
     | 
|
| 
       65 
65 
     | 
    
         
             
                subject { [:hello] }
         
     | 
| 
       66 
66 
     | 
    
         | 
| 
       67 
67 
     | 
    
         
             
                it "should be capable of passing" do
         
     | 
| 
       68 
     | 
    
         
            -
                   
     | 
| 
      
 68 
     | 
    
         
            +
                  assert must(be_instance_of(Array))
         
     | 
| 
       69 
69 
     | 
    
         
             
                end
         
     | 
| 
       70 
70 
     | 
    
         | 
| 
       71 
71 
     | 
    
         
             
                it "should be capable of failing" do
         
     | 
| 
         @@ -79,7 +79,7 @@ describe "#must" do 
     | 
|
| 
       79 
79 
     | 
    
         
             
                end
         
     | 
| 
       80 
80 
     | 
    
         | 
| 
       81 
81 
     | 
    
         
             
                it "should be capable of passing" do
         
     | 
| 
       82 
     | 
    
         
            -
                   
     | 
| 
      
 82 
     | 
    
         
            +
                  assert must(be_instance_of(String))
         
     | 
| 
       83 
83 
     | 
    
         
             
                end
         
     | 
| 
       84 
84 
     | 
    
         | 
| 
       85 
85 
     | 
    
         
             
                it "should be capable of failing" do
         
     | 
| 
         @@ -89,7 +89,7 @@ describe "#must" do 
     | 
|
| 
       89 
89 
     | 
    
         | 
| 
       90 
90 
     | 
    
         
             
              describe "without a subject" do
         
     | 
| 
       91 
91 
     | 
    
         
             
                it "should error" do
         
     | 
| 
       92 
     | 
    
         
            -
                  assert_raises( 
     | 
| 
      
 92 
     | 
    
         
            +
                  assert_raises(NoMethodError) { must be_instance_of Array }
         
     | 
| 
       93 
93 
     | 
    
         
             
                end
         
     | 
| 
       94 
94 
     | 
    
         
             
              end
         
     | 
| 
       95 
95 
     | 
    
         
             
            end
         
     | 
| 
         @@ -101,7 +101,7 @@ describe "#wont" do 
     | 
|
| 
       101 
101 
     | 
    
         
             
                subject { [:hello] }
         
     | 
| 
       102 
102 
     | 
    
         | 
| 
       103 
103 
     | 
    
         
             
                it "should be capable of passing" do
         
     | 
| 
       104 
     | 
    
         
            -
                   
     | 
| 
      
 104 
     | 
    
         
            +
                  wont(be_instance_of(String))
         
     | 
| 
       105 
105 
     | 
    
         
             
                end
         
     | 
| 
       106 
106 
     | 
    
         | 
| 
       107 
107 
     | 
    
         
             
                it "should be capable of failing" do
         
     | 
| 
         @@ -115,7 +115,7 @@ describe "#wont" do 
     | 
|
| 
       115 
115 
     | 
    
         
             
                end
         
     | 
| 
       116 
116 
     | 
    
         | 
| 
       117 
117 
     | 
    
         
             
                it "should be capable of passing" do
         
     | 
| 
       118 
     | 
    
         
            -
                   
     | 
| 
      
 118 
     | 
    
         
            +
                  wont(be_instance_of(Array))
         
     | 
| 
       119 
119 
     | 
    
         
             
                end
         
     | 
| 
       120 
120 
     | 
    
         | 
| 
       121 
121 
     | 
    
         
             
                it "should be capable of failing" do
         
     | 
| 
         @@ -125,7 +125,7 @@ describe "#wont" do 
     | 
|
| 
       125 
125 
     | 
    
         | 
| 
       126 
126 
     | 
    
         
             
              describe "without a subject" do
         
     | 
| 
       127 
127 
     | 
    
         
             
                it "should error" do
         
     | 
| 
       128 
     | 
    
         
            -
                  assert_raises( 
     | 
| 
      
 128 
     | 
    
         
            +
                  assert_raises(NoMethodError) { wont be_instance_of Array }
         
     | 
| 
       129 
129 
     | 
    
         
             
                end
         
     | 
| 
       130 
130 
     | 
    
         
             
              end
         
     | 
| 
       131 
131 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: minitest-matchers_vaccine
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.5
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Ryan McGeary
         
     | 
| 
       8 
     | 
    
         
            -
            autorequire: 
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-05-12 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: minitest
         
     | 
| 
         @@ -24,20 +24,6 @@ dependencies: 
     | 
|
| 
       24 
24 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
26 
     | 
    
         
             
                    version: '5.0'
         
     | 
| 
       27 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       28 
     | 
    
         
            -
              name: bundler
         
     | 
| 
       29 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       30 
     | 
    
         
            -
                requirements:
         
     | 
| 
       31 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       32 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       33 
     | 
    
         
            -
                    version: '1.6'
         
     | 
| 
       34 
     | 
    
         
            -
              type: :development
         
     | 
| 
       35 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       36 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       37 
     | 
    
         
            -
                requirements:
         
     | 
| 
       38 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       39 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       40 
     | 
    
         
            -
                    version: '1.6'
         
     | 
| 
       41 
27 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       42 
28 
     | 
    
         
             
              name: rake
         
     | 
| 
       43 
29 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -69,7 +55,7 @@ homepage: https://github.com/rmm5t/minitest-matchers_vaccine 
     | 
|
| 
       69 
55 
     | 
    
         
             
            licenses:
         
     | 
| 
       70 
56 
     | 
    
         
             
            - MIT
         
     | 
| 
       71 
57 
     | 
    
         
             
            metadata: {}
         
     | 
| 
       72 
     | 
    
         
            -
            post_install_message: 
     | 
| 
      
 58 
     | 
    
         
            +
            post_install_message:
         
     | 
| 
       73 
59 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       74 
60 
     | 
    
         
             
            require_paths:
         
     | 
| 
       75 
61 
     | 
    
         
             
            - lib
         
     | 
| 
         @@ -84,9 +70,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       84 
70 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       85 
71 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       86 
72 
     | 
    
         
             
            requirements: []
         
     | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
       88 
     | 
    
         
            -
             
     | 
| 
       89 
     | 
    
         
            -
            signing_key: 
         
     | 
| 
      
 73 
     | 
    
         
            +
            rubygems_version: 3.3.12
         
     | 
| 
      
 74 
     | 
    
         
            +
            signing_key:
         
     | 
| 
       90 
75 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       91 
76 
     | 
    
         
             
            summary: Adds support for RSpec-style matchers to minitest.
         
     | 
| 
       92 
77 
     | 
    
         
             
            test_files:
         
     |