Class: Cucumber::Core::Test::Result::Passed
- Inherits:
-
Object
- Object
- Cucumber::Core::Test::Result::Passed
- Defined in:
- lib/cucumber/core/test/result.rb
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
Class Method Summary collapse
Instance Method Summary collapse
- #describe_to(visitor, *args) ⇒ Object
-
#initialize(duration) ⇒ Passed
constructor
A new instance of Passed.
- #ok? ⇒ Boolean
- #to_message ⇒ Object
- #to_s ⇒ Object
- #with_appended_backtrace(_step) ⇒ Object
- #with_filtered_backtrace(_filter) ⇒ Object
Constructor Details
#initialize(duration) ⇒ Passed
Returns a new instance of Passed.
63 64 65 66 67 |
# File 'lib/cucumber/core/test/result.rb', line 63 def initialize(duration) raise ArgumentError unless duration @duration = duration end |
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
57 58 59 |
# File 'lib/cucumber/core/test/result.rb', line 57 def duration @duration end |
Class Method Details
.ok? ⇒ Boolean
59 60 61 |
# File 'lib/cucumber/core/test/result.rb', line 59 def self.ok?(*) true end |
Instance Method Details
#describe_to(visitor, *args) ⇒ Object
69 70 71 72 73 |
# File 'lib/cucumber/core/test/result.rb', line 69 def describe_to(visitor, *args) visitor.passed(*args) visitor.duration(duration, *args) self end |
#ok? ⇒ Boolean
86 87 88 |
# File 'lib/cucumber/core/test/result.rb', line 86 def ok?(*) self.class.ok? end |
#to_message ⇒ Object
79 80 81 82 83 84 |
# File 'lib/cucumber/core/test/result.rb', line 79 def Cucumber::Messages::TestStepResult.new( status: Cucumber::Messages::TestStepResultStatus::PASSED, duration: duration. ) end |
#to_s ⇒ Object
75 76 77 |
# File 'lib/cucumber/core/test/result.rb', line 75 def to_s '✓' end |
#with_appended_backtrace(_step) ⇒ Object
90 91 92 |
# File 'lib/cucumber/core/test/result.rb', line 90 def with_appended_backtrace(_step) self end |
#with_filtered_backtrace(_filter) ⇒ Object
94 95 96 |
# File 'lib/cucumber/core/test/result.rb', line 94 def with_filtered_backtrace(_filter) self end |