Created
January 23, 2018 00:08
-
-
Save rrcobb/dbfe6ed389cd3e80d33517f57389d88e to your computer and use it in GitHub Desktop.
Rspec negated change matcher
This file contains 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
# This should be in rspec core, but add it here so we can chain negative change expectations, like | |
# expect { do_thing }.to change {a}.and not_change {b}.and change {b} | |
RSpec::Matchers.define_negated_matcher :not_change, :change |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment