Class: ReportAPISpy

Inherits:
Object show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/spec/report_api_spy.rb

Instance Method Summary collapse

Constructor Details

#initializeReportAPISpy

Returns a new instance of ReportAPISpy.



3
4
5
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/spec/report_api_spy.rb', line 3

def initialize
  @result = []
end

Instance Method Details

#done(*args) {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (ReportAPISpy)

    the object that the method was called on



17
18
19
20
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/spec/report_api_spy.rb', line 17

def done(*args)
  @result << [:done, *args]
  yield self if block_given?
end

#messagesObject



22
23
24
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/spec/report_api_spy.rb', line 22

def messages
  @result.map(&:first)
end

#test_case(*args) {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (ReportAPISpy)

    the object that the method was called on



7
8
9
10
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/spec/report_api_spy.rb', line 7

def test_case(*args)
  @result << [:test_case, *args]
  yield self if block_given?
end

#test_step(*args) {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (ReportAPISpy)

    the object that the method was called on



12
13
14
15
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/spec/report_api_spy.rb', line 12

def test_step(*args)
  @result << [:test_step, *args]
  yield self if block_given?
end