Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Mater does Rspec: ` not_to`
RSpec::Matchers.define :not_to do
match { |actual| !actual }
RSpec.describe "Mater" do
specify "says `to not to' to mean false" do
expect(false).to not_to
expect(true).not_to not_to
# Mater
# says `to not to' to mean false
# Finished in 0.00073 seconds (files took 0.14261 seconds to load)
# 1 example, 0 failures
Copy link

jamis commented Oct 20, 2015

Test failures are wonderful, too:

  1) Mater says `to not to' to mean false
     Failure/Error: expect(true).to not_to
       expected true to not to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment