Module: Stationed::Generators::Plugins::I18nSpec
- Included in:
- AppGenerator
- Defined in:
- lib/stationed/generators/plugins/i18n_spec.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.prepended(base) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/stationed/generators/plugins/i18n_spec.rb', line 5 def self.prepended(base) base.class_option :i18n_spec, type: :boolean, default: true, desc: 'Set up tests for locale files' end |
Instance Method Details
#finish_template ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/stationed/generators/plugins/i18n_spec.rb', line 12 def finish_template return super unless [:i18n_spec] gem 'i18n-spec', group: :test, require: false copy_file 'i18n_spec.rb', 'spec/locales/i18n_spec.rb' uncomment_lines 'config/environments/development.rb', /raise_on_missing_translations/ uncomment_lines 'config/environments/test.rb', /raise_on_missing_translations/ super end |