Class: Cucumber::Core::Test::Result::Passed

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/core/test/result.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(duration) ⇒ Passed

Returns a new instance of Passed.

Raises:

  • (ArgumentError)


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

#durationObject

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

Returns:

  • (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

Returns:

  • (Boolean)


87
88
89
# File 'lib/cucumber/core/test/result.rb', line 87

def ok?(*)
  self.class.ok?
end

#to_messageObject



80
81
82
83
84
85
# File 'lib/cucumber/core/test/result.rb', line 80

def to_message
  Cucumber::Messages::TestStepResult.new(
    status: Cucumber::Messages::TestStepResultStatus::PASSED,
    duration: duration.to_message_duration
  )
end

#to_sObject



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