Sha256: 4cd8b8fdb212bd1e929d058bcdb3a61062f1f79d5c67a231d25da68f2c11d189

Contents?: true

Size: 731 Bytes

Versions: 4

Compression:

Stored size: 731 Bytes

Contents

require "test_helper"
require "generators/workarea/listrak/message/message_generator"

module Workarea
  module Listrak
    class MessageGeneratorTest < Rails::Generators::TestCase
      tests MessageGenerator
      destination Dir.mktmpdir

      MESSAGE_NAME = "OrderConfirmation".freeze
      MESSAGE_PATH = "app/messages/workarea/order_confirmation_message.rb".freeze

      setup do
        prepare_destination
        run_generator [MESSAGE_NAME]
      end

      def test_generates_message_type_class
        assert_file MESSAGE_PATH do |message|
          assert_match "class OrderConfirmationMessage", message
          assert_match "include Listrak::TransactionalMessage", message
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
workarea-listrak-5.0.4 test/lib/generators/workarea/listrak/message_generator_test.rb
workarea-listrak-5.0.3 test/lib/generators/workarea/listrak/message_generator_test.rb
workarea-listrak-5.0.2 test/lib/generators/workarea/listrak/message_generator_test.rb
workarea-listrak-5.0.1 test/lib/generators/workarea/listrak/message_generator_test.rb