Sha256: 3745a83740eb057e243eb9cb2eacdeb7b95760636ffbea8bba7b67cb1075d893
Contents?: true
Size: 516 Bytes
Versions: 5
Compression:
Stored size: 516 Bytes
Contents
module RSpec module Mocks # @private class Proxy def ensure_can_be_proxied!(object) return unless object.is_a?(Symbol) || object.frozen? return if object.nil? msg = "Cannot proxy frozen objects" if Symbol === object msg += ". Symbols such as #{object} cannot be mocked or stubbed." else msg += ", rspec-mocks relies on proxies for method stubbing and expectations." end raise ArgumentError, msg end end end end
Version data entries
5 entries across 5 versions & 1 rubygems