Sha256: f344c781fb3c295bdfab169780c4af2b9167eed2d96f8e368648e4f89c9d0b96

Contents?: true

Size: 677 Bytes

Versions: 2

Compression:

Stored size: 677 Bytes

Contents

require 'test_helper'
require 'rails/generators'
require 'generators/indexers/install/install_generator'
require 'generators/indexers/indexer/indexer_generator'

class GeneratorTest < Rails::Generators::TestCase
  destination Rails.root.join('tmp')

  teardown do
    FileUtils.rm_rf destination_root
  end

  test 'install' do
    self.class.tests Indexers::Generators::InstallGenerator
    run_generator
    assert_file 'config/initializers/indexers.rb'
    assert_file 'config/elasticsearch.yml'
  end

  test 'index' do
    self.class.tests Indexers::Generators::IndexerGenerator
    run_generator %w(products)
    assert_file 'app/indexers/products_indexer.rb'
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
indexers-4.1.0.1 test/generator_test.rb
indexers-4.1.0.0 test/generator_test.rb