Module: CukePatterns::StepMotherExt

Defined in:
lib/cuke-patterns/step_mother_ext.rb

Overview

For extending the Cucumber::StepMother class

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(step_mother_class) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/cuke-patterns/step_mother_ext.rb', line 6

def self.included(step_mother_class)
  step_mother_class.class_eval do
    alias_method :load_code_files_without_cuke_patterns, :load_code_files
    alias_method :load_code_files, :load_code_files_with_cuke_patterns
  end

  super
end

Instance Method Details

#load_code_files_with_cuke_patterns(step_def_files) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/cuke-patterns/step_mother_ext.rb', line 15

def load_code_files_with_cuke_patterns(step_def_files)
  result = load_code_files_without_cuke_patterns(step_def_files)
  @programming_languages.each do |programming_language|
    programming_language.apply_cuke_patterns_to_delayed_step_definition_registrations!
  end
  return result
end