Sha256: daf8c6a75fe8b44c0a9398700b61b018c1686a5ca00322e1a78bf71193b0ccb6

Contents?: true

Size: 511 Bytes

Versions: 129

Compression:

Stored size: 511 Bytes

Contents

# frozen_string_literal: true

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

129 entries across 124 versions & 10 rubygems

Version Path
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actioncable-7.0.2.3/lib/rails/generators/test_unit/channel_generator.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actioncable-7.0.3.1/lib/rails/generators/test_unit/channel_generator.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actioncable-6.1.6.1/lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.0.5 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.0.4.3 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.7.3 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.7.2 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.0.4.2 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.0.4.1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.7.1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.0.6.1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.0.4 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.7 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.0.6 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.0.3.1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.6.1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.0.5.1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.0.5 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.6 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.0.3 lib/rails/generators/test_unit/channel_generator.rb