Sha256: 54cad9142127f6eda3c3e43ee44576600f5fea3b195a97c2afe84680d1fd2e09
Contents?: true
Size: 465 Bytes
Versions: 51
Compression:
Stored size: 465 Bytes
Contents
require 'mocha/is_a' require 'mocha/deprecation' module Mocha # :nodoc: class SingleReturnValue # :nodoc: def initialize(value) @value = value end def evaluate if @value.__is_a__(Proc) then message = 'use of Expectation#returns with instance of Proc - see Expectation#returns RDoc for alternatives' Deprecation.warning(message) @value.call else @value end end end end
Version data entries
51 entries across 51 versions & 4 rubygems