Created
October 20, 2015 16:35
-
-
Save jamis/54a21a4f6e176ffc18f5 to your computer and use it in GitHub Desktop.
Mater does Rspec: `expect.to not_to`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec::Matchers.define :not_to do | |
match { |actual| !actual } | |
end | |
RSpec.describe "Mater" do | |
specify "says `to not to' to mean false" do | |
expect(false).to not_to | |
expect(true).not_to not_to | |
end | |
end | |
# Mater | |
# says `to not to' to mean false | |
# | |
# Finished in 0.00073 seconds (files took 0.14261 seconds to load) | |
# 1 example, 0 failures |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test failures are wonderful, too: