Sha256: 4dbe1efed9aea985eca3dd07dbef27351ef53fe5d5d69e1854bd3bc7c44082bd

Contents?: true

Size: 949 Bytes

Versions: 2

Compression:

Stored size: 949 Bytes

Contents

require "test_helper"
require "rails/generators/test_case"
require "generators/bbq/install_generator"

class BbqInstallGeneratorTest < Rails::Generators::TestCase
  destination File.expand_path(File.join(File.dirname(__FILE__), '../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

2 entries across 2 versions & 1 rubygems

Version Path
bbq-rails-0.4.0 test/bbq_install_generator_test.rb
bbq-rails-0.3.0 test/bbq_install_generator_test.rb