Class: Spec::Matchers::Exist
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message_for_should ⇒ Object
- #failure_message_for_should_not ⇒ Object
- #matches?(actual) ⇒ Boolean
Instance Method Details
#description ⇒ Object
18 19 20 |
# File 'lib/spec/matchers/exist.rb', line 18 def description "exists" end |
#failure_message_for_should ⇒ Object
10 11 12 |
# File 'lib/spec/matchers/exist.rb', line 10 def "expected #{@actual.inspect} to exist, but it doesn't." end |
#failure_message_for_should_not ⇒ Object
14 15 16 |
# File 'lib/spec/matchers/exist.rb', line 14 def "expected #{@actual.inspect} to not exist, but it does." end |
#matches?(actual) ⇒ Boolean
5 6 7 8 |
# File 'lib/spec/matchers/exist.rb', line 5 def matches?(actual) @actual = actual actual.exist? end |