Sha256: 9fc7e0fbf973a0d5aab2bc8b1e859b491f48516be7e5b2ecb4fe6394b5d10baa

Contents?: true

Size: 640 Bytes

Versions: 1

Compression:

Stored size: 640 Bytes

Contents

require 'test_helper'
require 'rails/generators'
require 'generators/indices/install_generator'
require 'generators/indices/index_generator'

class GeneratorsTest < Rails::Generators::TestCase
  destination File.expand_path('../tmp', File.dirname(__FILE__))

  teardown do
    FileUtils.rm_rf self.destination_root
  end

  test 'install' do
    self.class.tests Indices::Generators::InstallGenerator
    run_generator
    assert_file 'config/initializers/indices.rb'
  end

  test 'index' do
    self.class.tests Indices::Generators::IndexGenerator
    run_generator %w(products)
    assert_file 'app/indices/products_index.rb'
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
indices-0.0.1 test/generators_test.rb