Skip to content

Instantly share code, notes, and snippets.

@kerrizor
Created September 29, 2013 17:38
Show Gist options
  • Save kerrizor/6754701 to your computer and use it in GitHub Desktop.
Save kerrizor/6754701 to your computer and use it in GitHub Desktop.
class MiniTest::Unit::TestCase
def assert_change(block)
before = block.call
yield
refute_equal before, block.call
end
def refute_change(block)
before = block.call
yield
assert_equal before, block.call
end
end
@kerrizor
Copy link
Author

assert_change(lambda { @deck.cards.first }) { @deck.cut! }

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