Skip to content

Commit

Permalink
Configure Mobility in translations generator spec
Browse files Browse the repository at this point in the history
  • Loading branch information
shioyama committed Oct 20, 2020
1 parent f98fbea commit 00b41dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions spec/generators/rails/mobility/install_generator_spec.rb
Expand Up @@ -2,6 +2,8 @@

return unless defined?(Rails)

require "rails/generators/mobility/install_generator"

describe Mobility::InstallGenerator, type: :generator do
require "generator_spec/test_case"
include GeneratorSpec::TestCase
Expand Down
11 changes: 10 additions & 1 deletion spec/generators/rails/mobility/translations_generator_spec.rb
Expand Up @@ -2,16 +2,25 @@

return unless defined?(Rails)

require "rails/generators/mobility/translations_generator"

describe Mobility::TranslationsGenerator, type: :generator do
require "generator_spec/test_case"
include GeneratorSpec::TestCase
include Helpers::Generators
require "rails/generators/mobility/translations_generator"

destination File.expand_path("../tmp", __FILE__)

after(:all) { prepare_destination }

before do
Mobility.configure do |config|
config.plugins do
backend :key_value
end
end
end

describe "--backend=table" do
after(:each) { connection.drop_table :post_translations if connection.data_source_exists?(:post_translations) }

Expand Down

0 comments on commit 00b41dd

Please sign in to comment.