Class: Cucumberator::Commands::Steps

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumberator/commands/steps.rb

Class Method Summary collapse

Class Method Details

.all_steps(scenario) ⇒ Object



14
15
16
# File 'lib/cucumberator/commands/steps.rb', line 14

def all_steps(scenario)
  @steps ||= Cucumberator::Steps.new(scenario).all
end

.perform(scenario, *args, &block) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/cucumberator/commands/steps.rb', line 4

def perform(scenario, *args, &block)
  steps = all_steps(scenario)
  if steps and steps.size > 0
    puts ":: Yay, you have #{@steps.size} steps in your pocket:"
    steps.each { |s| puts s }
  else
    puts ":: Sorry, no steps detected"
  end
end