Module: Bridgetown::IntuitiveExpectations
- Defined in:
- bridgetown-core/lib/bridgetown-core/concerns/intuitive_expectations.rb
Overview
This is for including into Minitest::Expectation
Instance Method Summary collapse
-
#!=(other) ⇒ Object
-
#==(other) ⇒ Object
-
#=~(other) ⇒ Object
-
#empty?(msg = nil) ⇒ Boolean
-
#exclude?(other, msg = nil) ⇒ Boolean
-
#false?(msg = nil) ⇒ Boolean
-
#filled?(msg = nil) ⇒ Boolean
-
#include?(other, msg = nil) ⇒ Boolean
(also: #<<)
-
#is_a?(klass, msg = nil) ⇒ Boolean
-
#nil?(msg = nil) ⇒ Boolean
-
#not_nil?(msg = nil) ⇒ Boolean
-
#true?(msg = nil) ⇒ Boolean
Instance Method Details
#!=(other) ⇒ Object
21 22 23 24 |
# File 'bridgetown-core/lib/bridgetown-core/concerns/intuitive_expectations.rb', line 21 def !=(other) must_not_equal(other) self end |
#==(other) ⇒ Object
16 17 18 19 |
# File 'bridgetown-core/lib/bridgetown-core/concerns/intuitive_expectations.rb', line 16 def ==(other) must_equal(other) self end |
#=~(other) ⇒ Object
57 58 59 60 |
# File 'bridgetown-core/lib/bridgetown-core/concerns/intuitive_expectations.rb', line 57 def =~(other) must_match(other) self end |
#empty?(msg = nil) ⇒ Boolean
36 37 38 39 |
# File 'bridgetown-core/lib/bridgetown-core/concerns/intuitive_expectations.rb', line 36 def empty?(msg = nil) must_be_empty(msg) self end |
#exclude?(other, msg = nil) ⇒ Boolean
52 53 54 55 |
# File 'bridgetown-core/lib/bridgetown-core/concerns/intuitive_expectations.rb', line 52 def exclude?(other, msg = nil) wont_include(other, msg) self end |
#false?(msg = nil) ⇒ Boolean
11 12 13 14 |
# File 'bridgetown-core/lib/bridgetown-core/concerns/intuitive_expectations.rb', line 11 def false?(msg = nil) wont_be(:itself, Minitest::Assertions::UNDEFINED, msg) self end |
#filled?(msg = nil) ⇒ Boolean
41 42 43 44 |
# File 'bridgetown-core/lib/bridgetown-core/concerns/intuitive_expectations.rb', line 41 def filled?(msg = nil) wont_be_empty(msg) self end |
#include?(other, msg = nil) ⇒ Boolean Also known as: <<
46 47 48 49 |
# File 'bridgetown-core/lib/bridgetown-core/concerns/intuitive_expectations.rb', line 46 def include?(other, msg = nil) must_include(other, msg) self end |
#is_a?(klass, msg = nil) ⇒ Boolean
62 63 64 65 |
# File 'bridgetown-core/lib/bridgetown-core/concerns/intuitive_expectations.rb', line 62 def is_a?(klass, msg = nil) must_be_instance_of(klass, msg) self end |
#nil?(msg = nil) ⇒ Boolean
26 27 28 29 |
# File 'bridgetown-core/lib/bridgetown-core/concerns/intuitive_expectations.rb', line 26 def nil?(msg = nil) must_be_nil(msg) self end |
#not_nil?(msg = nil) ⇒ Boolean
31 32 33 34 |
# File 'bridgetown-core/lib/bridgetown-core/concerns/intuitive_expectations.rb', line 31 def not_nil?(msg = nil) wont_be_nil(msg) self end |
#true?(msg = nil) ⇒ Boolean
6 7 8 9 |
# File 'bridgetown-core/lib/bridgetown-core/concerns/intuitive_expectations.rb', line 6 def true?(msg = nil) must_be(:itself, Minitest::Assertions::UNDEFINED, msg) self end |