Sha256: d9883a47aae006fd581e1b667f7e414ad51f6a8a96113517dc7f69b4d8da3ca2

Contents?: true

Size: 921 Bytes

Versions: 6

Compression:

Stored size: 921 Bytes

Contents

# :enddoc:
require 'test/unit/testcase'

if defined?(ActionController)
  require 'shoulda/matchers/action_controller'

  class ActionController::TestCase
    include Shoulda::Matchers::ActionController
    extend Shoulda::Matchers::ActionController

    def subject
      @controller
    end
  end
end

if defined?(ActiveRecord)
  require 'shoulda/matchers/active_record'
  require 'shoulda/matchers/active_model'

  module Test
    module Unit
      class TestCase
        include Shoulda::Matchers::ActiveRecord
        extend Shoulda::Matchers::ActiveRecord
        include Shoulda::Matchers::ActiveModel
        extend Shoulda::Matchers::ActiveModel
      end
    end
  end
elsif defined?(ActiveModel)
  require 'shoulda/matchers/active_model'

  module Test
    module Unit
      class TestCase
        include Shoulda::Matchers::ActiveModel
        extend Shoulda::Matchers::ActiveModel
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
shoulda-matchers-2.3.0 lib/shoulda/matchers/integrations/test_unit.rb
challah-1.0.0 vendor/bundle/gems/shoulda-matchers-2.2.0/lib/shoulda/matchers/integrations/test_unit.rb
shoulda-matchers-2.2.0 lib/shoulda/matchers/integrations/test_unit.rb
challah-1.0.0.beta3 vendor/bundle/gems/shoulda-matchers-2.1.0/lib/shoulda/matchers/integrations/test_unit.rb
shoulda-matchers-2.1.0 lib/shoulda/matchers/integrations/test_unit.rb
shoulda-matchers-2.0.0 lib/shoulda/matchers/integrations/test_unit.rb