mirror of
https://github.com/thoughtbot/shoulda-matchers.git
synced 2022-11-09 12:01:38 -05:00
54 lines
1.1 KiB
Ruby
54 lines
1.1 KiB
Ruby
# :enddoc:
|
|
|
|
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?(ActionMailer)
|
|
require 'shoulda/matchers/action_mailer'
|
|
|
|
module Test
|
|
module Unit
|
|
class TestCase
|
|
include Shoulda::Matchers::ActionMailer
|
|
extend Shoulda::Matchers::ActionMailer
|
|
end
|
|
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
|