Module: Minitest::Expectations
- Defined in:
- lib/minitest-bonus-assertions.rb
Instance Method Summary collapse
-
#assert_false ⇒ Object
See Minitest::Assertions#assert_false.
-
#assert_has_keys ⇒ Object
See Minitest::Assertions#assert_has_keys.
-
#assert_missing_keys ⇒ Object
See Minitest::Assertions#assert_missing_keys.
-
#assert_raises_with_message ⇒ Object
See Minitest::Assertions#assert_raises_with_message.
-
#assert_set_equal ⇒ Object
See Minitest::Assertions#assert_set_equal.
-
#assert_true ⇒ Object
See Minitest::Assertions#assert_true.
-
#must_be_between(*args) ⇒ Object
See Minitest::Assertions#assert_between.
-
#refute_set_equal ⇒ Object
See Minitest::refuteions#refute_set_equal.
Instance Method Details
#assert_false ⇒ Object
See Minitest::Assertions#assert_false
false.must_be_false
:method: must_be_false
118 |
# File 'lib/minitest-bonus-assertions.rb', line 118 infect_an_assertion :assert_false, :must_be_false, :unary |
#assert_has_keys ⇒ Object
See Minitest::Assertions#assert_has_keys
hash.must_have_keys %w(a b c)
:method: must_have_keys
151 |
# File 'lib/minitest-bonus-assertions.rb', line 151 infect_an_assertion :assert_has_keys, :must_have_keys, :unary |
#assert_missing_keys ⇒ Object
See Minitest::Assertions#assert_missing_keys
hash.must_not_have_keys %w(a b c)
:method: must_not_have_keys
160 |
# File 'lib/minitest-bonus-assertions.rb', line 160 infect_an_assertion :assert_missing_keys, :must_not_have_keys, :unary |
#assert_raises_with_message ⇒ Object
See Minitest::Assertions#assert_raises_with_message
proc { ... }.must_raise_with_message exception, message
:method: must_raise_with_message
169 |
# File 'lib/minitest-bonus-assertions.rb', line 169 infect_an_assertion :assert_raises_with_message, :must_raise_with_message |
#assert_set_equal ⇒ Object
See Minitest::Assertions#assert_set_equal
%w(a b c).must_equal_set %(c b a)
:method: must_equal_set
178 |
# File 'lib/minitest-bonus-assertions.rb', line 178 infect_an_assertion :assert_set_equal, :must_equal_set, :unary |
#assert_true ⇒ Object
See Minitest::Assertions#assert_true
true.must_be_true
:method: must_be_true
127 |
# File 'lib/minitest-bonus-assertions.rb', line 127 infect_an_assertion :assert_true, :must_be_true, :unary |
#must_be_between(*args) ⇒ Object
See Minitest::Assertions#assert_between
2.must_be_between 1, 3
2.must_be_between 1..3
135 136 137 138 139 140 141 142 |
# File 'lib/minitest-bonus-assertions.rb', line 135 def must_be_between *args hi, lo, msg = if args.first.kind_of?(Range) [args.first.begin, args.first.end, args[1]] else args[0..2] end ctx.assert_between lo, hi, target, msg end |
#refute_set_equal ⇒ Object
See Minitest::refuteions#refute_set_equal
%w(a b c).must_equal_set %(c b a)
:method: must_equal_set
187 |
# File 'lib/minitest-bonus-assertions.rb', line 187 infect_an_assertion :refute_set_equal, :must_not_equal_set, :unary |