Sha256: 14f5c46e30b9dacc2ef2b916e821881eb196f02b861466ac1c43ca821bc4b05e

Contents?: true

Size: 663 Bytes

Versions: 7

Compression:

Stored size: 663 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'
require 'generators/sublease/install/install_generator'

module Sublease
  class InstallGeneratorTest < Rails::Generators::TestCase
    tests InstallGenerator
    destination Rails.root.join('tmp/generators')
    setup :prepare_destination

    test 'install generator runs without errors' do
      assert_nothing_raised do
        run_generator ['sublease:install']
      end
    end

    test 'initalizer copied to config/initializers/sublease.rb' do
      path = Rails.root + 'config/initializers/sublease.rb'
      assert_file path do
        run_generator ['sublease:install']
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sublease-0.3.0 test/lib/generators/sublease/install_generator_test.rb
sublease-0.2.3 test/lib/generators/sublease/install_generator_test.rb
sublease-0.2.2 test/lib/generators/sublease/install_generator_test.rb
sublease-0.2.1 test/lib/generators/sublease/install_generator_test.rb
sublease-0.2.0 test/lib/generators/sublease/install_generator_test.rb
sublease-0.1.1 test/lib/generators/sublease/install_generator_test.rb
sublease-0.1.0 test/lib/generators/sublease/install_generator_test.rb