Sha256: 48b705185cee85da93b990667038fc956aacc32292660aa7a6f6fa6b76faabe3

Contents?: true

Size: 743 Bytes

Versions: 2

Compression:

Stored size: 743 Bytes

Contents

require 'test_helper'
require 'generators/test_unit/interaction_generator'

class InteractionGeneratorTestUnitTest < Rails::Generators::TestCase
  tests TestUnit::InteractionGenerator
  destination File.expand_path("../../tmp/test", File.dirname(__FILE__))
  setup :prepare_destination

  def test_test_unit_file_generation
    run_generator %w(Users::Create --requirements params --fail_with ErrorClass)
    
    assert_file "test/interactions/users/create_test.rb" do |interaction_test|
      assert_instance_method :test_run_implemented, interaction_test do |test_run_implemented|
        assert_match /assert_nothing_raised/, test_run_implemented
      end
      assert_match /class Users::CreateTest/, interaction_test
    end 
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simple_interaction-rails-0.0.8 test/generators/test_unit/interaction_generator_test_unit_test.rb
simple_interaction-rails-0.0.7 test/generators/test_unit/interaction_generator_test_unit_test.rb