Class: Spec::Runner::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/spec-i18n/runner/configuration.rb

Instance Method Summary collapse

Instance Method Details

#languageObject



10
11
12
# File 'lib/spec-i18n/runner/configuration.rb', line 10

def language
  @spec_language
end

#load_languageObject

Load all Modules and Classes for the language specified



15
16
17
18
19
20
21
22
23
# File 'lib/spec-i18n/runner/configuration.rb', line 15

def load_language
  Spec::DSL::Main.register_adverbs
  Kernel.register_expectations_keywords
  Spec::Example::ExampleGroupMethods.register_example_adverbs
  Spec::Example::BeforeAndAfterHooks.register_hooks
  Spec::Matchers.register_all_matchers
  Spec::Example::Subject::ExampleGroupMethods.register_subjects
  Spec::Example::Subject::ExampleMethods.register_subjects
end

#spec_language(language) ⇒ Object



4
5
6
7
8
# File 'lib/spec-i18n/runner/configuration.rb', line 4

def spec_language(language)
  @spec_language = language ? language.to_s : "en"
  load_language
  @spec_language
end