Sha256: 2ba6a1c85e91ab1e7e85b84b52ba5df64d30f006f5e9aa01607c4599dba2ee33

Contents?: true

Size: 731 Bytes

Versions: 2

Compression:

Stored size: 731 Bytes

Contents

require 'spec_helper'
require 'generator_spec'
require 'generators/translation_center/add_lang/add_lang_generator'

module TranslationCenter
  describe AddLangGenerator do
    include GeneratorSpec::TestCase
    destination File.expand_path("../../tmp", __FILE__)
    arguments %w(fr)

    context "add language" do
      it "should add a French language" do
        prepare_destination

        run_generator

        migration_path = "db/migrate/add_fr_status_translation_center_translation_keys.rb"
        assert_migration migration_path

        # Cleaning up generated migration file
        FileUtils.rm_rf(Dir[File.expand_path("../../tmp", __FILE__)])
        assert_no_migration migration_path
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
translation_center-2.0.2 spec/lib/generators/translation_center/add_lang/add_lang_generator_spec.rb
translation_center-2.0.1 spec/lib/generators/translation_center/add_lang/add_lang_generator_spec.rb