Class: Gauntlt::Stepdef

Inherits:
Object
  • Object
show all
Defined in:
lib/gauntlt/stepdef.rb

Class Method Summary collapse

Class Method Details

.find(cuke_runtime) ⇒ Object


6
7
8
9
# File 'lib/gauntlt/stepdef.rb', line 6

def find(cuke_runtime)
  cuke_runtime.send(:load_step_definitions)
  cuke_runtime.instance_variable_get(:@support_code).step_definitions
end

.sources(cuke_runtime) ⇒ Object


11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/gauntlt/stepdef.rb', line 11

def sources(cuke_runtime)
  returner = {:aruba => [], :gauntlt => []}

  self.find(cuke_runtime).each do |step_definition|
    if step_definition.file =~ /aruba/
      returner[:aruba] << step_definition.regexp_source
    else
      returner[:gauntlt] << step_definition.regexp_source
    end
  end

  returner
end