Sha256: 21f3e5dbcb2dc45ec4e39dc4c74175c0017d803f54d6472f8db79eaa92b0ba3c

Contents?: true

Size: 1015 Bytes

Versions: 5

Compression:

Stored size: 1015 Bytes

Contents

module MiniTestSpecRails
  module Init
    module ActiveSupportBehavior

      extend ActiveSupport::Concern

      included do
        singleton_class.class_eval { remove_method :describe }
        extend MiniTest::Spec::DSL
        include MiniTestSpecRails::DSL
        register_spec_type(self) { |desc| Class === desc }
        register_rails_test_case self
      end

    end
  end
end

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


# The AbstractController::Helpers#default_helper_module! blows up using
# ActiveSupport's modified LoadError class under Ruby 1.8 because describe
# blocks with spaces for their names have a `module_path` of something like
# "nested 1" while in Ruby 1.9 it is something like "#<Class:0x007fa256ea1118>"
# and hence wont find a #path match in REGEXPS due to the space. So add
# another that allows filenames with spaces in it.
#
require 'active_support/core_ext/load_error'
LoadError::REGEXPS << %r{^Missing \w+ (?:file\s*)?(.*\.rb)$}i

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
minitest-spec-rails-4.7.11 lib/minitest-spec-rails/init/active_support.rb
minitest-spec-rails-4.7.10 lib/minitest-spec-rails/init/active_support.rb
minitest-spec-rails-4.7.9 lib/minitest-spec-rails/init/active_support.rb
minitest-spec-rails-4.7.8 lib/minitest-spec-rails/init/active_support.rb
minitest-spec-rails-4.7.7 lib/minitest-spec-rails/init/active_support.rb