Class: Tracing::Matchers::Span::FollowAfter
- Inherits:
-
Object
- Object
- Tracing::Matchers::Span::FollowAfter
- Includes:
- Test::TypeCheck
- Defined in:
- lib/tracing/matchers/span/follow_after.rb
Instance Method Summary collapse
- #description ⇒ String
- #failure_message ⇒ String (also: #failure_message_for_should)
- #failure_message_when_negated ⇒ String (also: #failure_message_for_should_not)
-
#initialize(previous) ⇒ FollowAfter
constructor
A new instance of FollowAfter.
- #matches?(span) ⇒ Boolean
Constructor Details
#initialize(previous) ⇒ FollowAfter
Returns a new instance of FollowAfter.
8 9 10 11 |
# File 'lib/tracing/matchers/span/follow_after.rb', line 8 def initialize(previous) NotNull! previous @expected = previous end |
Instance Method Details
#description ⇒ String
23 24 25 |
# File 'lib/tracing/matchers/span/follow_after.rb', line 23 def description "follow after #{}" end |
#failure_message ⇒ String Also known as: failure_message_for_should
28 29 30 |
# File 'lib/tracing/matchers/span/follow_after.rb', line 28 def "expected #{} to follow after #{}" end |
#failure_message_when_negated ⇒ String Also known as: failure_message_for_should_not
34 35 36 |
# File 'lib/tracing/matchers/span/follow_after.rb', line 34 def "did not expected #{} to follow after #{}" end |
#matches?(span) ⇒ Boolean
14 15 16 17 18 19 20 |
# File 'lib/tracing/matchers/span/follow_after.rb', line 14 def matches?(span) @tracer = span.tracer @subject = span return false unless expected_index && subject_index expected_index < subject_index end |