Sha256: e53868f972ccfe71929c44f790952c7cae82484ddfa3f731ddba07da5f0f2f04

Contents?: true

Size: 803 Bytes

Versions: 9

Compression:

Stored size: 803 Bytes

Contents

module MiniTestSpecRails
  module Init
    module ActiveSupportBehavior
      extend ActiveSupport::Concern

      included do
        extend MiniTest::Spec::DSL
        include MiniTestSpecRails::DSL
        include ActiveSupport::Testing::ConstantLookup
        extend Descriptions
        register_spec_type(self) { |desc| desc.is_a?(Class) }
      end

      module Descriptions
        def described_class
          determine_constant_from_test_name(name) do |constant|
            constant.is_a?(Class)
          end
        end
      end

      if Minitest::VERSION < '5.3.3'
        def initialize(*args)
          Thread.current[:current_spec] = self
          super
        end
      end
    end
  end
end

ActiveSupport::TestCase.send :include, MiniTestSpecRails::Init::ActiveSupportBehavior

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
minitest-spec-rails-7.0.0 lib/minitest-spec-rails/init/active_support.rb
minitest-spec-rails-6.2.0 lib/minitest-spec-rails/init/active_support.rb
minitest-spec-rails-6.1.0 lib/minitest-spec-rails/init/active_support.rb
minitest-spec-rails-6.0.4 lib/minitest-spec-rails/init/active_support.rb
minitest-spec-rails-6.0.3 lib/minitest-spec-rails/init/active_support.rb
minitest-spec-rails-6.0.2 lib/minitest-spec-rails/init/active_support.rb
minitest-spec-rails-6.0.1 lib/minitest-spec-rails/init/active_support.rb
minitest-spec-rails-6.0.0 lib/minitest-spec-rails/init/active_support.rb
minitest-spec-rails-5.5.0 lib/minitest-spec-rails/init/active_support.rb