Sha256: 63648c5c4c51c1850089241127c621b9743cdeffce84c5b911b73caae8e526b4
Contents?: true
Size: 988 Bytes
Versions: 1
Compression:
Stored size: 988 Bytes
Contents
if defined?(ActiveSupport::TestCase) class << ActiveSupport::TestCase remove_method :describe end MiniTest::Spec.register_spec_type ActiveSupport::TestCase do |desc| desc.respond_to?(:ancestors) && !(desc.ancestors.map(&:to_s) & ["ActiveRecord::Base", "Mongoid::Document", "MongoMapper::Document", "DataMapper::Resource"]).empty? end end if defined?(ActionController::TestCase) class ActionController::TestCase def self.determine_default_controller_class(name) if name.match(/.*(?:^|::)(\w+Controller)/) $1.safe_constantize else super(name) end end before { setup_controller_request_and_response } end MiniTest::Spec.register_spec_type /Controller/, ActionController::TestCase end if defined?(ActionDispatch::IntegrationTest) class ActionDispatch::IntegrationTest before { self.class.app = Rails.application } end MiniTest::Spec.register_spec_type /Integration Test$/, ActionDispatch::IntegrationTest end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
minitest-spec-rails-3.0.4 | lib/minitest-spec-rails/test_case.rb |