Class: Remarkable::Matcher::Base

Inherits:
Object
  • Object
show all
Includes:
DSL
Defined in:
lib/remarkable/matcher_base.rb

Instance Method Summary collapse

Methods included from DSL

included, #matches?

Instance Method Details

#failure_messageObject



11
12
13
# File 'lib/remarkable/matcher_base.rb', line 11

def failure_message
  "Expected #{expectation} (#{@missing})"
end

#negativeObject



6
7
8
9
# File 'lib/remarkable/matcher_base.rb', line 6

def negative
  @negative = true
  self
end

#negative_failure_messageObject



15
16
17
# File 'lib/remarkable/matcher_base.rb', line 15

def negative_failure_message
  "Did not expect #{expectation}"
end

#spec(spec) ⇒ Object



19
20
21
22
# File 'lib/remarkable/matcher_base.rb', line 19

def spec(spec)
  @spec = spec
  self
end