class Cucumber::Filters::ActivateSteps::CaseFilter::FindMatch

Attributes

configuration[R]
test_step[R]

Public Class Methods

new(step_match_search, configuration, test_step) click to toggle source
# File lib/cucumber/filters/activate_steps.rb, line 40
def initialize(step_match_search, configuration, test_step)
  @step_match_search, @configuration, @test_step = step_match_search, configuration, test_step
end

Public Instance Methods

result() click to toggle source
# File lib/cucumber/filters/activate_steps.rb, line 44
def result
  begin
    return NoStepMatch.new(test_step.source.last, test_step.text) unless matches.any?
  rescue Cucumber::Ambiguous => e
    return AmbiguousStepMatch.new(e)
  end
  configuration.notify :step_activated, test_step, match
  return SkippingStepMatch.new if configuration.dry_run?
  match
end

Private Instance Methods

match() click to toggle source
# File lib/cucumber/filters/activate_steps.rb, line 60
def match
  matches.first
end
matches() click to toggle source
# File lib/cucumber/filters/activate_steps.rb, line 64
def matches
  step_match_search.call(test_step.text)
end