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.
64 65 66 67 68 |
# File 'lib/cucumber/core/test/result.rb', line 64 def initialize(duration) raise ArgumentError unless duration @duration = duration end |
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
58 59 60 |
# File 'lib/cucumber/core/test/result.rb', line 58 def duration @duration end |
Class Method Details
.ok? ⇒ Boolean
60 61 62 |
# File 'lib/cucumber/core/test/result.rb', line 60 def self.ok?(*) true end |
Instance Method Details
#describe_to(visitor, *args) ⇒ Object
70 71 72 73 74 |
# File 'lib/cucumber/core/test/result.rb', line 70 def describe_to(visitor, *args) visitor.passed(*args) visitor.duration(duration, *args) self end |
#ok? ⇒ Boolean
87 88 89 |
# File 'lib/cucumber/core/test/result.rb', line 87 def ok?(*) self.class.ok? end |
#to_message ⇒ Object
80 81 82 83 84 85 |
# File 'lib/cucumber/core/test/result.rb', line 80 def Cucumber::Messages::TestStepResult.new( status: Cucumber::Messages::TestStepResultStatus::PASSED, duration: duration. ) end |
#to_s ⇒ Object
76 77 78 |
# File 'lib/cucumber/core/test/result.rb', line 76 def to_s '✓' end |
#with_appended_backtrace(_step) ⇒ Object
91 92 93 |
# File 'lib/cucumber/core/test/result.rb', line 91 def with_appended_backtrace(_step) self end |
#with_filtered_backtrace(_filter) ⇒ Object
95 96 97 |
# File 'lib/cucumber/core/test/result.rb', line 95 def with_filtered_backtrace(_filter) self end |