Sha256: 5b1ee77255faf977e6b45682e560c18df3d2d1f7abc8a577a579c71aab4f576d

Contents?: true

Size: 875 Bytes

Versions: 11

Compression:

Stored size: 875 Bytes

Contents

# :enddoc:
require 'shoulda/matchers/integrations/nunit_test_case_detection'

Shoulda::Matchers.nunit_test_case_constants.each do |constant|
  constant.class_eval do
    include Shoulda::Matchers::Independent
    extend Shoulda::Matchers::Independent
  end
end

if defined?(ActionController::TestCase)
  ActionController::TestCase.class_eval do
    include Shoulda::Matchers::ActionController
    extend Shoulda::Matchers::ActionController

    def subject
      @controller
    end
  end
end

if defined?(ActiveSupport::TestCase)
  ActiveSupport::TestCase.class_eval do
    if defined?(Shoulda::Matchers::ActiveRecord)
      include Shoulda::Matchers::ActiveRecord
      extend Shoulda::Matchers::ActiveRecord
    end

    if defined?(Shoulda::Matchers::ActiveModel)
      include Shoulda::Matchers::ActiveModel
      extend Shoulda::Matchers::ActiveModel
    end
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/shoulda-matchers-2.8.0/lib/shoulda/matchers/integrations/test_unit.rb
shoulda-matchers-2.8.0 lib/shoulda/matchers/integrations/test_unit.rb
shoulda-matchers-2.8.0.rc2 lib/shoulda/matchers/integrations/test_unit.rb
shoulda-matchers-2.8.0.rc1 lib/shoulda/matchers/integrations/test_unit.rb
shoulda-matchers-2.7.0 lib/shoulda/matchers/integrations/test_unit.rb
shoulda-matchers-2.6.2 lib/shoulda/matchers/integrations/test_unit.rb
mcmire-shoulda-matchers-2.6.2.docs.1 lib/shoulda/matchers/integrations/test_unit.rb
mcmire-shoulda-matchers-2.6.1.docs.1 lib/shoulda/matchers/integrations/test_unit.rb
shoulda-matchers-2.6.1 lib/shoulda/matchers/integrations/test_unit.rb
shoulda-matchers-2.6.1.rc2 lib/shoulda/matchers/integrations/test_unit.rb
shoulda-matchers-2.6.1.rc1 lib/shoulda/matchers/integrations/test_unit.rb