class Lopata::Scenario
Scenario
runtime class.
All the scenarios are running in context of separate Lopata::Scenario
object.
Attributes
execution[R]
@private
Public Class Methods
new(execution)
click to toggle source
@private
# File lib/lopata/scenario.rb, line 14 def initialize(execution) @execution = execution end
Public Instance Methods
metadata()
click to toggle source
@return [Hash] metadata available for current step @note The metadata keys also availalbe as methods (via method_missing
)
# File lib/lopata/scenario.rb, line 32 def metadata execution.metadata end
pending(message = nil)
click to toggle source
Marks current step as pending @example
it 'pending step' do pending expect(1).to eq 2 end
Pending steps wont be failed
# File lib/lopata/scenario.rb, line 26 def pending(message = nil) execution.current_step.pending!(message) end
Private Instance Methods
method_missing(method, *args, &block)
click to toggle source
@private
Calls superclass method
# File lib/lopata/scenario.rb, line 39 def method_missing(method, *args, &block) if execution.let_methods.include?(method) instance_exec(*args, &execution.let_methods[method]) elsif metadata.keys.include?(method) metadata[method] else super end end
respond_to_missing?(method, *)
click to toggle source
@private
Calls superclass method
# File lib/lopata/scenario.rb, line 50 def respond_to_missing?(method, *) execution.let_methods.include?(method) or metadata.keys.include?(method) or super end