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-6.0.4.3 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.0.4.2 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.4.2 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.0.0.rc2 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.0.0.rc1 lib/rails/generators/test_unit/channel_generator.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/actioncable-6.1.4.1/lib/rails/generators/test_unit/channel_generator.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/actioncable-6.1.4.1/lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.0.0.alpha2 lib/rails/generators/test_unit/channel_generator.rb
actioncable-7.0.0.alpha1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.4.1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.0.4.1 lib/rails/generators/test_unit/channel_generator.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/actioncable-6.1.4/lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.4 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.0.4 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.0.3.7 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.3.2 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.3.1 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.0.3.6 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.3 lib/rails/generators/test_unit/channel_generator.rb
actioncable-6.1.2.1 lib/rails/generators/test_unit/channel_generator.rb