Class: NilClass
Instance Method Summary collapse
- #should_be(val) ⇒ Object
- #should_be_empty ⇒ Object
- #should_not_be(val) ⇒ Object
- #should_not_be_empty ⇒ Object
- #should_not_exist ⇒ Object
Instance Method Details
#should_be(val) ⇒ Object
48 49 50 |
# File 'lib/spectre/assertion.rb', line 48 def should_be(val) raise AssertionFailure.new("Value is empty, but it should be '#{val.to_s.trim}'", val, nil) unless val == nil end |
#should_be_empty ⇒ Object
52 53 |
# File 'lib/spectre/assertion.rb', line 52 def should_be_empty end |
#should_not_be(val) ⇒ Object
55 56 57 |
# File 'lib/spectre/assertion.rb', line 55 def should_not_be(val) raise AssertionFailure.new(val, 'nil') unless val != nil end |
#should_not_be_empty ⇒ Object
62 63 64 |
# File 'lib/spectre/assertion.rb', line 62 def should_not_be_empty raise AssertionFailure.new('Value is empty', 'nil') end |
#should_not_exist ⇒ Object
59 60 |
# File 'lib/spectre/assertion.rb', line 59 def should_not_exist end |