Sha256: 2d4765aa3d4126494f7e5ba5f6361c2e4c6f0c8f7e4659b0c9b114807b55bce1

Contents?: true

Size: 757 Bytes

Versions: 6

Compression:

Stored size: 757 Bytes

Contents

require "test_helper"
require "generators/bbq/test_generator"

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

  tests Bbq::TestGenerator

  def test_creating_test_unit_feature_file
    run_generator %w(MySuperThing -t test_unit)

    assert_file "test/acceptance/my_super_thing_test.rb", /class MySuperThingTest < Bbq::TestCase/
    assert_file "test/acceptance/my_super_thing_test.rb", /require "test_helper"/
  end

  def test_creating_rspec_feature_file
    run_generator %w(MySuperThing -t rspec)

    assert_file "spec/acceptance/my_super_thing_spec.rb", /feature "My super thing" do/
    assert_file "spec/acceptance/my_super_thing_spec.rb", /require "spec_helper"/
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bbq-0.0.4 test/unit/bbq_test_generator_test.rb
bbq-0.0.3 test/unit/bbq_test_generator_test.rb
bbq-0.0.2 test/unit/bbq_test_generator_test.rb
bbq-0.0.2.beta.3 test/unit/bbq_test_generator_test.rb
bbq-0.0.2.beta.2 test/unit/bbq_test_generator_test.rb
bbq-0.0.2.beta.1 test/unit/bbq_test_generator_test.rb