Sha256: d239988abd129ff5e88c2ddc803bb53d2038deed32d06f4d4e4f3f5210dfd27e

Contents?: true

Size: 718 Bytes

Versions: 25

Compression:

Stored size: 718 Bytes

Contents

require 'test_helper'

class InstallGeneratorTest < Rails::Generators::TestCase

  tests Errdo::Generators::InstallGenerator
  destination File.expand_path("../../tmp", __FILE__)
  setup :prepare_destination
  setup :make_application_rb
  setup :make_initializers_dir

  should "assert initializer is properly created" do
    run_generator
    assert_file "config/initializers/errdo.rb"
  end

  private

  def make_application_rb
    mkdir "#{destination_root}/config/"
    File.open("#{destination_root}/config/application.rb", 'w') do |file|
      file.write("module Dummy\n  class Application\n  end\nend")
    end
  end

  def make_initializers_dir
    mkdir "#{destination_root}/config/initializers/"
  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
errdo-0.12.14 test/generators/install_generator_test.rb
errdo-0.12.13 test/generators/install_generator_test.rb
errdo-0.12.12 test/generators/install_generator_test.rb
errdo-0.12.11 test/generators/install_generator_test.rb
errdo-0.12.10 test/generators/install_generator_test.rb
errdo-0.12.9 test/generators/install_generator_test.rb
errdo-0.12.8 test/generators/install_generator_test.rb
errdo-0.12.7 test/generators/install_generator_test.rb
errdo-0.12.6 test/generators/install_generator_test.rb
errdo-0.12.5 test/generators/install_generator_test.rb
errdo-0.12.4 test/generators/install_generator_test.rb
errdo-0.12.3 test/generators/install_generator_test.rb
errdo-0.12.2 test/generators/install_generator_test.rb
errdo-0.12.1 test/generators/install_generator_test.rb
errdo-0.12.0 test/generators/install_generator_test.rb
errdo-0.11.6 test/generators/install_generator_test.rb
errdo-0.11.5 test/generators/install_generator_test.rb
errdo-0.11.4 test/generators/install_generator_test.rb
errdo-0.11.3 test/generators/install_generator_test.rb
errdo-0.11.2 test/generators/install_generator_test.rb