Sha256: 18646b6057bc28cb49032609bc41927f82271c259343fdaa042ff3011a9e4272

Contents?: true

Size: 871 Bytes

Versions: 7

Compression:

Stored size: 871 Bytes

Contents

require "test_helper"
require "generators/bbq/install_generator"

class BbqInstallGeneratorTest < Rails::Generators::TestCase
  destination Bbq.root.join("tmp")
  setup :prepare_destination

  tests Bbq::InstallGenerator

  def test_creating_test_unit_test_directories
    run_generator %w(-t test_unit)

    assert_directory "test/acceptance"
    assert_directory "test/support"
  end

  def test_creating_rspec_test_directories
    run_generator %w(-t rspec)

    assert_directory "spec/acceptance"
    assert_directory "spec/support"
  end

  def test_creating_test_unit_test_user_stub
    run_generator %w(-t test_unit)

    assert_file "test/support/test_user.rb", /class TestUser < Bbq::TestUser/
  end

  def test_creating_rspec_test_user_stub
    run_generator %w(-t rspec)

    assert_file "spec/support/test_user.rb", /class TestUser < Bbq::TestUser/
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bbq-0.2.1 test/unit/bbq_install_generator_test.rb
bbq-0.2.0 test/unit/bbq_install_generator_test.rb
bbq-0.1.0 test/unit/bbq_install_generator_test.rb
bbq-0.0.4 test/unit/bbq_install_generator_test.rb
bbq-0.0.3 test/unit/bbq_install_generator_test.rb
bbq-0.0.2 test/unit/bbq_install_generator_test.rb
bbq-0.0.2.beta.3 test/unit/bbq_install_generator_test.rb