Skip to content

Commit

Permalink
Merge pull request #88 from rmm5t/patch-1
Browse files Browse the repository at this point in the history
Add minitest-matchers_vaccine suggestion to README
  • Loading branch information
metaskills committed Feb 12, 2018
2 parents 706e337 + 4e03d6a commit 0aad963
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,17 @@ describe Post do
end
```

Alternatively, try the [mintest-matchers_vaccine](https://github.com/rmm5t/minitest-matchers_vaccine) gem to avoid _infecting_ the objects that you want to test.

```ruby
describe User do
subject { User.new }
it "should validate email" do
must have_valid(:email).when("a@a.com", "foo@bar.com")
wont have_valid(:email).when(nil, "", "foo", "foo@bar")
end
end
```

## Gotchas

Expand Down

0 comments on commit 0aad963

Please sign in to comment.