Class: Shoulda::Matchers::Integrations::Libraries::Rails

Inherits:
Object
  • Object
show all
Includes:
Rails
Defined in:
lib/shoulda/matchers/integrations/libraries/rails.rb

Constant Summary collapse

SUB_LIBRARIES =
[
  :active_model,
  :active_record,
  :action_controller,
  :routing,
].freeze

Instance Method Summary collapse

Methods included from Rails

#rails?

Instance Method Details

#integrate_with(test_framework) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'lib/shoulda/matchers/integrations/libraries/rails.rb', line 18

def integrate_with(test_framework)
  Shoulda::Matchers.assertion_exception_class =
    ActiveSupport::TestCase::Assertion

  SUB_LIBRARIES.each do |name|
    library = Integrations.find_library!(name)
    library.integrate_with(test_framework)
  end
end