Class: Cucumber::NoStepMatch

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/step_match.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(step, name) ⇒ NoStepMatch

Returns a new instance of NoStepMatch.


113
114
115
116
# File 'lib/cucumber/step_match.rb', line 113

def initialize(step, name)
  @step = step
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name


111
112
113
# File 'lib/cucumber/step_match.rb', line 111

def name
  @name
end

#step_definitionObject (readonly)

Returns the value of attribute step_definition


111
112
113
# File 'lib/cucumber/step_match.rb', line 111

def step_definition
  @step_definition
end

Instance Method Details

#activate(test_step) ⇒ Object


143
144
145
146
# File 'lib/cucumber/step_match.rb', line 143

def activate(test_step)
  # noop
  test_step
end

#backtrace_lineObject


131
132
133
# File 'lib/cucumber/step_match.rb', line 131

def backtrace_line
  @step.backtrace_line
end

#file_colon_lineObject


127
128
129
# File 'lib/cucumber/step_match.rb', line 127

def file_colon_line
  location.to_s
end

#format_args(*_args) ⇒ Object


118
119
120
# File 'lib/cucumber/step_match.rb', line 118

def format_args(*_args)
  @name
end

#locationObject


122
123
124
125
# File 'lib/cucumber/step_match.rb', line 122

def location
  raise "No location for #{@step}" unless @step.location
  @step.location
end

#step_argumentsObject


139
140
141
# File 'lib/cucumber/step_match.rb', line 139

def step_arguments
  []
end

#text_lengthObject


135
136
137
# File 'lib/cucumber/step_match.rb', line 135

def text_length
  @step.text.length
end