Class: TestEqualityWithLCS::Spec::BeEqualWithLCS

Inherits:
Object
  • Object
show all
Includes:
TestEqualityWithLCS::SharedMethods
Defined in:
lib/test_equality_with_lcs/spec.rb

Instance Method Summary collapse

Methods included from TestEqualityWithLCS::SharedMethods

included

Constructor Details

#initialize(expected) ⇒ BeEqualWithLCS

Returns a new instance of BeEqualWithLCS.



6
7
8
# File 'lib/test_equality_with_lcs/spec.rb', line 6

def initialize expected
  @expected = expected
end

Instance Method Details

#failure_message_for_shouldObject



15
16
17
# File 'lib/test_equality_with_lcs/spec.rb', line 15

def failure_message_for_should
  message_for_argument_types @expected, @target
end

#failure_message_for_should_notObject



19
20
21
# File 'lib/test_equality_with_lcs/spec.rb', line 19

def failure_message_for_should_not
  message_for_argument_types @expected, @target
end

#matches?(target) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
13
# File 'lib/test_equality_with_lcs/spec.rb', line 10

def matches? target
  @target = target
  @expected == @target
end