Class: Spec::Matchers::BaseOperatorMatcher
- Inherits:
-
Object
- Object
- Spec::Matchers::BaseOperatorMatcher
show all
- Defined in:
- lib/spec/matchers/operator_matcher.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of BaseOperatorMatcher.
5
6
7
|
# File 'lib/spec/matchers/operator_matcher.rb', line 5
def initialize(target)
@target = target
end
|
Instance Method Details
#<(expected) ⇒ Object
34
35
36
37
|
# File 'lib/spec/matchers/operator_matcher.rb', line 34
def <(expected)
@expected = expected
__delegate_method_missing_to_target("<", expected)
end
|
#<=(expected) ⇒ Object
39
40
41
42
|
# File 'lib/spec/matchers/operator_matcher.rb', line 39
def <=(expected)
@expected = expected
__delegate_method_missing_to_target("<=", expected)
end
|
#==(expected) ⇒ Object
9
10
11
12
|
# File 'lib/spec/matchers/operator_matcher.rb', line 9
def ==(expected)
@expected = expected
__delegate_method_missing_to_target("==", expected)
end
|
#===(expected) ⇒ Object
14
15
16
17
|
# File 'lib/spec/matchers/operator_matcher.rb', line 14
def ===(expected)
@expected = expected
__delegate_method_missing_to_target("===", expected)
end
|
#=~(expected) ⇒ Object
19
20
21
22
|
# File 'lib/spec/matchers/operator_matcher.rb', line 19
def =~(expected)
@expected = expected
__delegate_method_missing_to_target("=~", expected)
end
|
#>(expected) ⇒ Object
24
25
26
27
|
# File 'lib/spec/matchers/operator_matcher.rb', line 24
def >(expected)
@expected = expected
__delegate_method_missing_to_target(">", expected)
end
|
#>=(expected) ⇒ Object
29
30
31
32
|
# File 'lib/spec/matchers/operator_matcher.rb', line 29
def >=(expected)
@expected = expected
__delegate_method_missing_to_target(">=", expected)
end
|
#fail_with_message(message) ⇒ Object
44
45
46
|
# File 'lib/spec/matchers/operator_matcher.rb', line 44
def fail_with_message(message)
Spec::Expectations.fail_with(message, @expected, @target)
end
|