Sha256: 9e48769359555e8eacca9dfe066e59e455ae7b3ab8c4c222ca9b0a53e54af485

Contents?: true

Size: 532 Bytes

Versions: 21

Compression:

Stored size: 532 Bytes

Contents

# frozen_string_literal: true

# :markup: markdown

module TestUnit
  module Generators
    class ChannelGenerator < ::Rails::Generators::NamedBase
      source_root File.expand_path("templates", __dir__)

      check_class_collision suffix: "ChannelTest"

      def create_test_files
        template "channel_test.rb", File.join("test/channels", class_path, "#{file_name}_channel_test.rb")
      end

      private
        def file_name # :doc:
          @_file_name ||= super.sub(/_channel\z/i, "")
        end
    end
  end
end

Version data entries

21 entries across 21 versions & 3 rubygems

Version Path
actioncable-8.0.0 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.2.2 lib/rails/generators/test_unit/channel_generator.rb
actioncable-8.0.0.rc2 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.2.1.2 lib/rails/generators/test_unit/channel_generator.rb
actioncable-8.0.0.rc1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.2.1.1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-next-0.1.1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-next-0.1.0 lib/rails/generators/test_unit/channel_generator.rb
actioncable-8.0.0.beta1 lib/rails/generators/test_unit/channel_generator.rb
omg-actioncable-8.0.0.alpha9 lib/rails/generators/test_unit/channel_generator.rb
omg-actioncable-8.0.0.alpha8 lib/rails/generators/test_unit/channel_generator.rb
omg-actioncable-8.0.0.alpha7 lib/rails/generators/test_unit/channel_generator.rb
omg-actioncable-8.0.0.alpha4 lib/rails/generators/test_unit/channel_generator.rb
omg-actioncable-8.0.0.alpha3 lib/rails/generators/test_unit/channel_generator.rb
omg-actioncable-8.0.0.alpha2 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.2.1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.2.0 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.2.0.rc1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.2.0.beta3 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.2.0.beta2 lib/rails/generators/test_unit/channel_generator.rb