Sha256: 1a3c52c732ac99f71d8bd0c23fb4cf043bf392b3b24dc297f5d4b7a607d18a25
Contents?: true
Size: 443 Bytes
Versions: 1
Compression:
Stored size: 443 Bytes
Contents
# encoding: utf-8 RSpec.configure do |config| mod = Module.new do # Returns the double with +#frozen?+ and +#freeze+ methods defined # def frozen_double(*args) options = args.last.instance_of?(Hash) ? args.pop : {} name = args.first instance = double name, options.merge(frozen?: true) allow(instance).to receive(:freeze).and_return(instance) instance end end config.include mod end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
immutability-0.0.5 | spec/support/frozen_double.rb |