minitest-matchers_vaccine 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -6
- data/lib/minitest/matchers_vaccine.rb +1 -1
- data/lib/minitest/matchers_vaccine/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb80454b738eb771f9cca770dd92759a32530235
|
4
|
+
data.tar.gz: e4cee0805b5eb057bccc9d43fdd6f4f247fe622f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 368eba63adc0a8c66cea8b5fa2e5148867d42bc86d56e5c05cf3f1b3ad28e17e5f8dd2e75aa4f933fcf23a3f7f485c64ba76e002096ee0b3ed399b2989f278f6
|
7
|
+
data.tar.gz: 080ab87fa00653728ea1cd97c3a2cfe09e2dbfa90ff8ef34d6d74c520dc63d1afeb4dc184e9cb8955887af198735f8344efa88fb778e3819d6ddc4e1c405b97c
|
data/README.md
CHANGED
@@ -56,13 +56,14 @@ Or install it yourself as:
|
|
56
56
|
## Usage
|
57
57
|
|
58
58
|
Includes both `assert_must` and `assert_wont` assertions, but also includes
|
59
|
-
`must` and `wont` facilitator assertions that automatically default to
|
60
|
-
|
59
|
+
`must` and `wont` facilitator assertions that automatically default to using
|
60
|
+
the current `subject` method (aka "let variable") or `@subject` instance
|
61
|
+
variable.
|
61
62
|
|
62
63
|
**NOTE:** This gem does not allow matchers to be used with an expectation
|
63
64
|
syntax. Let's avoid infecting the objects we're testing.
|
64
65
|
|
65
|
-
###
|
66
|
+
### Minitest::Test
|
66
67
|
|
67
68
|
```ruby
|
68
69
|
class UserTest < Minitest::Test
|
@@ -88,14 +89,14 @@ class UserTest < Minitest::Test
|
|
88
89
|
end
|
89
90
|
```
|
90
91
|
|
91
|
-
###
|
92
|
+
### Minitest::Spec
|
92
93
|
|
93
94
|
```ruby
|
94
95
|
describe User do
|
95
96
|
subject { User.new }
|
96
97
|
|
97
98
|
# Works with shoulda-matchers
|
98
|
-
it "should have fields and
|
99
|
+
it "should have fields and associations" do
|
99
100
|
must have_db_column :name
|
100
101
|
must belong_to :account
|
101
102
|
must have_many :widgets
|
@@ -124,7 +125,8 @@ end
|
|
124
125
|
|
125
126
|
## Credits
|
126
127
|
|
127
|
-
The idea was originally inspired by the assertions implementation in
|
128
|
+
The idea was originally inspired by the matcher assertions implementation in
|
129
|
+
[minitest-matchers](https://github.com/wojtekmach/minitest-matchers).
|
128
130
|
|
129
131
|
## License
|
130
132
|
|
@@ -3,7 +3,7 @@ require "minitest/matchers_vaccine/version"
|
|
3
3
|
|
4
4
|
# Borrowed and modified from minitest-matchers, but we don't need all the
|
5
5
|
# other RSpec-style expectation "infections."
|
6
|
-
module
|
6
|
+
module Minitest
|
7
7
|
module Assertions
|
8
8
|
##
|
9
9
|
# Passes if matcher.matches?(subject) returns true
|