mirror of
https://github.com/thoughtbot/shoulda-matchers.git
synced 2022-11-09 12:01:38 -05:00
31 lines
538 B
Ruby
31 lines
538 B
Ruby
module Shoulda
|
|
module Matchers
|
|
# @private
|
|
def self.configure
|
|
yield configuration
|
|
end
|
|
|
|
# @private
|
|
def self.integrations
|
|
configuration.integrations
|
|
end
|
|
|
|
# @private
|
|
def self.configuration
|
|
@_configuration ||= Configuration.new
|
|
end
|
|
|
|
# @private
|
|
class Configuration
|
|
attr_reader :integrations
|
|
|
|
def initialize
|
|
@integrations = nil
|
|
end
|
|
|
|
def integrate(&block)
|
|
@integrations = Integrations::Configuration.apply(&block)
|
|
end
|
|
end
|
|
end
|
|
end
|