Module: Spec::Example::ExampleGroupMethods

Defined in:
lib/spec-i18n/example/example_group_methods.rb

Class Method Summary collapse

Class Method Details

.register_example_adverbsObject



5
6
7
8
9
# File 'lib/spec-i18n/example/example_group_methods.rb', line 5

def self.register_example_adverbs
  natural_language.example_group_keywords.each do |key, values|
    values.each { |value|  alias_method value, key }
  end
end

.translate_it_should_behave_likeObject

tranlated it_should_behave_like word



12
13
14
15
16
# File 'lib/spec-i18n/example/example_group_methods.rb', line 12

def self.translate_it_should_behave_like
  natural_language.it_should_behave_like_keywords.each do |it_should_behave_like_method, it_should_behave_like_keywords|
    it_should_behave_like_keywords.each { |keyword| alias_method keyword, it_should_behave_like_method}
  end
end