Class: Cucumber::StepDefinitions

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

Instance Method Summary collapse

Constructor Details

#initialize(configuration = Configuration.default) ⇒ StepDefinitions

Returns a new instance of StepDefinitions.



3
4
5
6
7
# File 'lib/cucumber/step_definitions.rb', line 3

def initialize(configuration = Configuration.default)
  configuration = Configuration.parse(configuration)
  @support_code = Runtime::SupportCode.new(nil, false)
  @support_code.load_files_from_paths(configuration.autoload_code_paths)
end

Instance Method Details

#to_jsonObject



9
10
11
# File 'lib/cucumber/step_definitions.rb', line 9

def to_json
  @support_code.step_definitions.map{|stepdef| stepdef.to_hash}.to_json
end