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
actioncable-7.1.5 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.1.4.2 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.0.8.6 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.7.10 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.7.9 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.1.4.1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.0.8.5 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.1.4 lib/rails/generators/test_unit/channel_generator.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/actioncable-7.1.3.4/lib/rails/generators/test_unit/channel_generator.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/actioncable-7.0.8.4/lib/rails/generators/test_unit/channel_generator.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/actioncable-7.0.5.1/lib/rails/generators/test_unit/channel_generator.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/actioncable-7.0.5.1/lib/rails/generators/test_unit/channel_generator.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/actioncable-7.0.5.1/lib/rails/generators/test_unit/channel_generator.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/actioncable-7.1.3.4/lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.1.3.4 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.0.8.4 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.7.8 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.1.3.2 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.1.3.1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.0.8.1 lib/rails/generators/test_unit/channel_generator.rb