Sha256: c1bd424327300087d075792013cb0b6895d8c1efe1f8a88d8f288c86a75a5750

Contents?: true

Size: 963 Bytes

Versions: 15

Compression:

Stored size: 963 Bytes

Contents

require 'forwardable'

module Shoulda
  module Matchers
    # @private
    module Doublespeak
      class << self
        extend Forwardable

        def_delegators :world, :double_collection_for,
          :with_doubles_activated

        def world
          @_world ||= World.new
        end

        def debugging_enabled?
          ENV['DEBUG_DOUBLESPEAK'] == '1'
        end

        def debug(&block)
          if debugging_enabled?
            puts block.call
          end
        end
      end
    end
  end
end

require 'shoulda/matchers/doublespeak/double'
require 'shoulda/matchers/doublespeak/double_collection'
require 'shoulda/matchers/doublespeak/double_implementation_registry'
require 'shoulda/matchers/doublespeak/method_call'
require 'shoulda/matchers/doublespeak/object_double'
require 'shoulda/matchers/doublespeak/proxy_implementation'
require 'shoulda/matchers/doublespeak/stub_implementation'
require 'shoulda/matchers/doublespeak/world'

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
shoulda-matchers-4.4.1 lib/shoulda/matchers/doublespeak.rb
shoulda-matchers-4.3.0 lib/shoulda/matchers/doublespeak.rb
shoulda-matchers-4.2.0 lib/shoulda/matchers/doublespeak.rb
shoulda-matchers-4.1.2 lib/shoulda/matchers/doublespeak.rb
shoulda-matchers-4.1.1 lib/shoulda/matchers/doublespeak.rb
shoulda-matchers-4.1.0 lib/shoulda/matchers/doublespeak.rb
shoulda-matchers-4.0.1 lib/shoulda/matchers/doublespeak.rb
shoulda-matchers-3.1.3 lib/shoulda/matchers/doublespeak.rb
shoulda-matchers-4.0.0.rc1 lib/shoulda/matchers/doublespeak.rb
shoulda-matchers-3.1.2 lib/shoulda/matchers/doublespeak.rb
shoulda-matchers-3.1.1 lib/shoulda/matchers/doublespeak.rb
shoulda-matchers-3.1.0 lib/shoulda/matchers/doublespeak.rb
shoulda-matchers-3.0.1 lib/shoulda/matchers/doublespeak.rb
shoulda-matchers-3.0.0 lib/shoulda/matchers/doublespeak.rb
shoulda-matchers-3.0.0.rc1 lib/shoulda/matchers/doublespeak.rb