Sha256: 4699aeb9af49da78e56528514b914e2e1275218d2563c9f8a4610ab349f2fae7
Contents?: true
Size: 797 Bytes
Versions: 8
Compression:
Stored size: 797 Bytes
Contents
require 'spec_helper' describe Mutant::Matcher::Method::Instance, '.build' do let(:object) { described_class } subject { object.build(cache, scope, method) } let(:cache) { double } let(:scope) do Class.new do include Adamantium def foo end memoize :foo def bar end end end let(:method) do scope.instance_method(method_name) end context 'with adamantium infected scope' do context 'with unmemoized method' do let(:method_name) { :bar } it { should eql(Mutant::Matcher::Method::Instance.new(cache, scope, method)) } end context 'with memoized method' do let(:method_name) { :foo } it { should eql(Mutant::Matcher::Method::Instance::Memoized.new(cache, scope, method)) } end end end
Version data entries
8 entries across 8 versions & 1 rubygems