bogus 0.0.2 → 0.0.3.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/Gemfile.lock +14 -2
- data/Guardfile +5 -0
- data/README.md +7 -249
- data/bogus.gemspec +3 -1
- data/features/.nav +21 -0
- data/features/authors.md +42 -0
- data/{CHANGELOG.md → features/changelog.md} +9 -2
- data/features/configuration_options.feature +1 -2
- data/features/{contract_tests_mocks.feature → contract_tests/contract_tests_mocks.feature} +4 -1
- data/features/{contract_tests_spies.feature → contract_tests/contract_tests_spies.feature} +2 -0
- data/features/{contract_tests_stubs.feature → contract_tests/contract_tests_stubs.feature} +14 -0
- data/features/contract_tests/readme.md +26 -0
- data/features/{return_value_contracts.feature → contract_tests/return_value_contracts.feature} +6 -2
- data/features/{anonymous_doubles.feature → fakes/anonymous_doubles.feature} +24 -8
- data/features/{fake_objects.feature → fakes/fake_objects.feature} +39 -4
- data/features/fakes/global_fake_configuration.feature +88 -0
- data/features/fakes/readme.md +11 -0
- data/features/fakes/replacing_classes.feature +148 -0
- data/features/getting_started.md +36 -0
- data/features/license.md +9 -0
- data/features/readme.md +173 -0
- data/features/safe_stubbing/argument_matchers.feature +30 -0
- data/features/safe_stubbing/readme.md +35 -0
- data/features/{safe_mocking.feature → safe_stubbing/safe_mocking.feature} +14 -0
- data/features/{safe_stubbing.feature → safe_stubbing/safe_stubbing.feature} +18 -4
- data/features/{spies.feature → safe_stubbing/spies.feature} +19 -4
- data/features/step_definitions/rspec_steps.rb +14 -5
- data/features/support/env.rb +4 -0
- data/lib/bogus.rb +2 -0
- data/lib/bogus/adds_recording.rb +11 -7
- data/lib/bogus/any_args.rb +7 -0
- data/lib/bogus/anything.rb +11 -0
- data/lib/bogus/contract_not_fulfilled.rb +17 -10
- data/lib/bogus/copies_classes.rb +2 -6
- data/lib/bogus/creates_fakes_with_stubbed_methods.rb +40 -0
- data/lib/bogus/double.rb +28 -8
- data/lib/bogus/ensures_all_interactions_satisfied.rb +36 -0
- data/lib/bogus/fake.rb +6 -0
- data/lib/bogus/fake_configuration.rb +69 -0
- data/lib/bogus/fakes_classes.rb +21 -0
- data/lib/bogus/has_overwritten_methods.rb +24 -0
- data/lib/bogus/have_received_matcher.rb +63 -0
- data/lib/bogus/injector.rb +36 -14
- data/lib/bogus/interaction.rb +33 -17
- data/lib/bogus/makes_substitute_methods.rb +15 -0
- data/lib/bogus/mocking_dsl.rb +31 -0
- data/lib/bogus/multi_stubber.rb +15 -0
- data/lib/bogus/not_all_expectations_satisfied.rb +27 -0
- data/lib/bogus/overwriten_classes.rb +15 -0
- data/lib/bogus/overwrites_classes.rb +2 -2
- data/lib/bogus/overwrites_methods.rb +42 -0
- data/lib/bogus/proxies_method_calls.rb +23 -0
- data/lib/bogus/proxy_class.rb +25 -16
- data/lib/bogus/public_methods.rb +36 -11
- data/lib/bogus/record_interactions.rb +3 -9
- data/lib/bogus/recording_proxy.rb +5 -0
- data/lib/bogus/registers_created_fakes.rb +2 -1
- data/lib/bogus/resets_overwritten_classes.rb +14 -0
- data/lib/bogus/resets_stubbed_methods.rb +12 -0
- data/lib/bogus/responds_to_everything.rb +11 -0
- data/lib/bogus/rspec.rb +7 -0
- data/lib/bogus/rspec_adapter.rb +17 -0
- data/lib/bogus/rspec_extensions.rb +8 -20
- data/lib/bogus/shadow.rb +60 -0
- data/lib/bogus/verifies_contracts.rb +5 -1
- data/lib/bogus/verifies_stub_definition.rb +5 -0
- data/lib/bogus/version.rb +1 -1
- data/lib/tracks_existence_of_test_doubles.rb +11 -0
- data/spec/bogus/adds_recording_spec.rb +46 -10
- data/spec/bogus/anything_spec.rb +13 -0
- data/spec/bogus/copies_classes_spec.rb +4 -3
- data/spec/bogus/creates_fakes_with_stubbed_methods_spec.rb +121 -0
- data/spec/bogus/double_spec.rb +63 -20
- data/spec/bogus/ensures_all_interactions_satisfied_spec.rb +43 -0
- data/spec/bogus/fake_configuration_spec.rb +99 -0
- data/spec/bogus/fakes_classes_spec.rb +46 -0
- data/spec/bogus/have_received_matcher_spec.rb +56 -0
- data/spec/bogus/interaction_spec.rb +18 -7
- data/spec/bogus/interactions_repository_spec.rb +42 -0
- data/spec/bogus/makes_substitute_methods_spec.rb +24 -0
- data/spec/bogus/mocking_dsl_spec.rb +234 -7
- data/spec/bogus/multi_stubber_spec.rb +31 -0
- data/spec/bogus/overwriten_classes_spec.rb +27 -0
- data/spec/bogus/overwrites_classes_spec.rb +2 -2
- data/spec/bogus/overwrites_methods_spec.rb +107 -0
- data/spec/bogus/proxy_class_spec.rb +6 -0
- data/spec/bogus/record_interactions_spec.rb +3 -4
- data/spec/bogus/registers_created_fakes_spec.rb +8 -0
- data/spec/bogus/resets_overwritten_classes_spec.rb +26 -0
- data/spec/bogus/resets_stubbed_methods_spec.rb +16 -0
- data/spec/bogus/shadow_spec.rb +182 -0
- data/spec/bogus/verifies_contracts_spec.rb +9 -3
- data/spec/bogus/verifies_stub_definition_spec.rb +4 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/support/fake_creator_of_fakes.rb +15 -0
- data/spec/support/sample_fake.rb +13 -0
- data/spec/tracks_existence_of_test_doubles_spec.rb +26 -0
- metadata +105 -32
- data/lib/bogus/creates_anonymous_stubs.rb +0 -27
- data/lib/bogus/invocation_matcher.rb +0 -27
- data/lib/bogus/rr_proxy.rb +0 -5
- data/spec/bogus/invocation_matcher_spec.rb +0 -26
@@ -1,24 +1,31 @@
|
|
1
1
|
module Bogus
|
2
2
|
class ContractNotFulfilled < StandardError
|
3
|
-
attr_reader :
|
3
|
+
attr_reader :fake_name, :missed_interactions, :actual_interactions
|
4
4
|
|
5
|
-
def initialize(
|
6
|
-
@
|
5
|
+
def initialize(fake_name, opts = {})
|
6
|
+
@fake_name = fake_name
|
7
|
+
@actual_interactions = opts.fetch(:actual)
|
8
|
+
@missed_interactions = opts.fetch(:missed)
|
7
9
|
super(message)
|
8
10
|
end
|
9
11
|
|
10
12
|
def message
|
11
|
-
|
12
|
-
|
13
|
+
str = <<-EOF
|
14
|
+
Contract not fullfilled for #{fake_name}!
|
13
15
|
|
14
|
-
|
16
|
+
Missed interactions:
|
17
|
+
#{interactions_str(missed_interactions)}
|
15
18
|
|
16
|
-
|
17
|
-
|
19
|
+
Actual interactions:
|
20
|
+
#{interactions_str(actual_interactions)}
|
21
|
+
EOF
|
22
|
+
str.gsub(' ' * 6, '')
|
18
23
|
end
|
19
24
|
|
20
|
-
|
21
|
-
|
25
|
+
private
|
26
|
+
|
27
|
+
def interactions_str(interactions)
|
28
|
+
interactions.map { |i| " - #{InteractionPresenter.new(i)}" }.join("\n")
|
22
29
|
end
|
23
30
|
end
|
24
31
|
end
|
data/lib/bogus/copies_classes.rb
CHANGED
@@ -2,7 +2,7 @@ module Bogus
|
|
2
2
|
class CopiesClasses
|
3
3
|
extend Takes
|
4
4
|
|
5
|
-
takes :
|
5
|
+
takes :makes_substitute_methods
|
6
6
|
|
7
7
|
def copy(klass)
|
8
8
|
copy_class = Class.new(Bogus::Fake)
|
@@ -33,11 +33,7 @@ module Bogus
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def method_as_string(method)
|
36
|
-
|
37
|
-
args_no_defaults = args.gsub(' = {}', '')
|
38
|
-
|
39
|
-
@method_stringifier.stringify(method,
|
40
|
-
"__record__(:#{method.name}, #{args_no_defaults})")
|
36
|
+
makes_substitute_methods.stringify(method)
|
41
37
|
end
|
42
38
|
|
43
39
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Bogus
|
2
|
+
class CreatesFakesWithStubbedMethods
|
3
|
+
extend Bogus::Takes
|
4
|
+
|
5
|
+
takes :multi_stubber, :creates_fakes,
|
6
|
+
:responds_to_everything, :fake_configuration
|
7
|
+
|
8
|
+
def create(name = nil, methods = {}, &block)
|
9
|
+
if name.is_a?(Hash)
|
10
|
+
methods = name
|
11
|
+
name = nil
|
12
|
+
end
|
13
|
+
|
14
|
+
fake = responds_to_everything unless name
|
15
|
+
|
16
|
+
fake_opts, methods = split_methods(methods)
|
17
|
+
fake_definition = get_configuration(name, fake_opts, methods, block)
|
18
|
+
|
19
|
+
fake ||= creates_fakes.create(fake_definition.name, fake_definition.opts,
|
20
|
+
&fake_definition.class_block)
|
21
|
+
|
22
|
+
multi_stubber.stub_all(fake, fake_definition.stubs)
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def split_methods(methods)
|
28
|
+
fake_args = proc{ |k,_| [:as].include?(k) }
|
29
|
+
[methods.select(&fake_args), methods.reject(&fake_args)]
|
30
|
+
end
|
31
|
+
|
32
|
+
def get_configuration(name, fake_opts, methods, block)
|
33
|
+
fake = FakeDefinition.new(name: name, opts: fake_opts, stubs: methods, class_block: block)
|
34
|
+
return fake unless fake_configuration.include?(name)
|
35
|
+
|
36
|
+
configured_fake = fake_configuration.get(name)
|
37
|
+
configured_fake.merge(fake)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/lib/bogus/double.rb
CHANGED
@@ -1,10 +1,30 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
module Bogus
|
2
|
+
class Double
|
3
|
+
extend Takes
|
4
|
+
include ProxiesMethodCalls
|
5
|
+
|
6
|
+
takes :object, :double_tracker, :verifies_stub_definition,
|
7
|
+
:overwrites_methods, :records_double_interactions
|
8
|
+
|
9
|
+
def stub
|
10
|
+
proxy(:stubs)
|
11
|
+
end
|
12
|
+
|
13
|
+
def stubs(name, *args, &return_value)
|
14
|
+
double_tracker.track(object)
|
15
|
+
verifies_stub_definition.verify!(object, name, args)
|
16
|
+
records_double_interactions.record(object, name, args, &return_value)
|
17
|
+
overwrites_methods.overwrite(object, name)
|
18
|
+
object.__shadow__.stubs(name, *args, &return_value)
|
19
|
+
end
|
20
|
+
|
21
|
+
def mock
|
22
|
+
proxy(:mocks)
|
23
|
+
end
|
24
|
+
|
25
|
+
def mocks(name, *args, &return_value)
|
26
|
+
stubs(name, *args, &return_value)
|
27
|
+
object.__shadow__.mocks(name, *args, &return_value)
|
28
|
+
end
|
9
29
|
end
|
10
30
|
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Bogus
|
2
|
+
class EnsuresAllInteractionsSatisfied
|
3
|
+
extend Bogus::Takes
|
4
|
+
|
5
|
+
def ensure_satisfied!(objects)
|
6
|
+
unsatisfied = unsatisfied_interactions(objects)
|
7
|
+
return if unsatisfied.empty?
|
8
|
+
|
9
|
+
calls = all_calls(objects)
|
10
|
+
raise NotAllExpectationsSatisfied.create(unsatisfied, calls)
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def unsatisfied_interactions(objects)
|
16
|
+
mapcat_shadows(objects) do |object, shadow|
|
17
|
+
shadow.unsatisfied_interactions.map{|c| [object, c]}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def all_calls(objects)
|
22
|
+
mapcat_shadows(objects) do |object, shadow|
|
23
|
+
shadow.calls.map{|c| [object, c]}
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def mapcat_shadows(objects, &block)
|
28
|
+
mapped = objects.map do |object|
|
29
|
+
shadow = object.__shadow__
|
30
|
+
block.call(object, shadow)
|
31
|
+
end
|
32
|
+
|
33
|
+
mapped.reduce([], :concat)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/lib/bogus/fake.rb
CHANGED
@@ -0,0 +1,69 @@
|
|
1
|
+
module Bogus
|
2
|
+
class FakeConfiguration
|
3
|
+
def include?(name)
|
4
|
+
fakes.key?(name)
|
5
|
+
end
|
6
|
+
|
7
|
+
def fake(name, opts = {}, &block)
|
8
|
+
opts = opts.dup
|
9
|
+
class_block = opts.delete(:class)
|
10
|
+
fakes[name] = FakeDefinition.new(name: name,
|
11
|
+
opts: opts,
|
12
|
+
stubs: stubs_hash(&block),
|
13
|
+
class_block: class_block)
|
14
|
+
end
|
15
|
+
|
16
|
+
def evaluate(&block)
|
17
|
+
instance_eval(&block)
|
18
|
+
end
|
19
|
+
|
20
|
+
def get(name)
|
21
|
+
fakes[name]
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def stubs_hash(&block)
|
27
|
+
stubs = StubsConfiguration.new(&block)
|
28
|
+
stubs.stubs
|
29
|
+
end
|
30
|
+
|
31
|
+
def fakes
|
32
|
+
@fakes ||= {}
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
class FakeDefinition
|
37
|
+
attr_reader :name, :class_block, :opts, :stubs
|
38
|
+
|
39
|
+
def initialize(attrs = {})
|
40
|
+
@name = attrs[:name]
|
41
|
+
@class_block = attrs[:class_block]
|
42
|
+
@opts = attrs[:opts] || {}
|
43
|
+
@stubs = attrs[:stubs] || {}
|
44
|
+
end
|
45
|
+
|
46
|
+
def merge(other)
|
47
|
+
FakeDefinition.new(name: other.name,
|
48
|
+
opts: opts.merge(other.opts),
|
49
|
+
stubs: stubs.merge(other.stubs),
|
50
|
+
class_block: other.class_block || class_block)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
class StubsConfiguration
|
55
|
+
include ProxiesMethodCalls
|
56
|
+
|
57
|
+
def initialize(&block)
|
58
|
+
proxy(:add_stub).instance_eval(&block) if block
|
59
|
+
end
|
60
|
+
|
61
|
+
def add_stub(name, value = nil, &block)
|
62
|
+
stubs[name] = block || value
|
63
|
+
end
|
64
|
+
|
65
|
+
def stubs
|
66
|
+
@stubs ||= {}
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Bogus
|
2
|
+
class FakesClasses
|
3
|
+
extend Takes
|
4
|
+
|
5
|
+
takes :creates_fakes_with_stubbed_methods, :overwrites_classes, :overwritten_classes
|
6
|
+
|
7
|
+
def fake(klass, opts = {})
|
8
|
+
opts = opts.merge(as: :class)
|
9
|
+
name = opts.delete(:fake_name) || underscore(klass.name.split('::').last).to_sym
|
10
|
+
fake = creates_fakes_with_stubbed_methods.create(name, opts) { klass }
|
11
|
+
overwrites_classes.overwrite(klass.name, fake)
|
12
|
+
overwritten_classes.add(klass.name, klass)
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def underscore(str)
|
18
|
+
str.gsub(/[A-Z]/) { |s| "_" + s.downcase }.gsub(/^_/, '')
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Bogus
|
2
|
+
module HasOverwritenMethods
|
3
|
+
def __overwritten_methods__
|
4
|
+
@__overwritten_methods__ ||= {}
|
5
|
+
end
|
6
|
+
|
7
|
+
def __overwrite__(name, method, body)
|
8
|
+
return if __overwritten_methods__[name]
|
9
|
+
method = method.to_proc if method
|
10
|
+
__overwritten_methods__[name] = method || :no_such_method
|
11
|
+
instance_eval(body)
|
12
|
+
end
|
13
|
+
|
14
|
+
def __reset__
|
15
|
+
__overwritten_methods__.each do |name, method|
|
16
|
+
method = __overwritten_methods__.delete(name)
|
17
|
+
instance_eval "undef #{name}"
|
18
|
+
next if method == :no_such_method
|
19
|
+
define_singleton_method(name, method)
|
20
|
+
end
|
21
|
+
@__overwritten_methods__ = {}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
module Bogus
|
2
|
+
class HaveReceivedMatcher
|
3
|
+
include ProxiesMethodCalls
|
4
|
+
|
5
|
+
extend Takes
|
6
|
+
NO_SHADOW = "Given object is not a fake and nothing was ever stubbed or mocked on it!"
|
7
|
+
|
8
|
+
takes :verifies_stub_definition, :records_double_interactions
|
9
|
+
|
10
|
+
def matches?(subject)
|
11
|
+
@subject = subject
|
12
|
+
return false unless Shadow.has_shadow?(subject)
|
13
|
+
|
14
|
+
verifies_stub_definition.verify!(subject, @name, @args)
|
15
|
+
records_double_interactions.record(subject, @name, @args)
|
16
|
+
|
17
|
+
subject.__shadow__.has_received(@name, @args)
|
18
|
+
end
|
19
|
+
|
20
|
+
def description
|
21
|
+
"have received #{call_str(@name, @args)}"
|
22
|
+
end
|
23
|
+
|
24
|
+
def failure_message_for_should
|
25
|
+
return NO_SHADOW unless Shadow.has_shadow?(@subject)
|
26
|
+
%Q{Expected #{@subject.inspect} to #{description}, but it didn't.\n\n} + all_calls_str
|
27
|
+
end
|
28
|
+
|
29
|
+
def failure_message_for_should_not
|
30
|
+
return NO_SHADOW unless Shadow.has_shadow?(@subject)
|
31
|
+
%Q{Expected #{@subject.inspect} not to #{description}, but it did.}
|
32
|
+
end
|
33
|
+
|
34
|
+
def method_call
|
35
|
+
proxy(:set_method)
|
36
|
+
end
|
37
|
+
|
38
|
+
def set_method(name, *args, &block)
|
39
|
+
@name = name
|
40
|
+
@args = args
|
41
|
+
self
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def call_str(method, args)
|
47
|
+
"#{method}(#{args.map(&:inspect).join(', ')})"
|
48
|
+
end
|
49
|
+
|
50
|
+
def all_calls_str
|
51
|
+
shadow = @subject.__shadow__
|
52
|
+
calls = shadow.calls.map{|i| call_str(i.method, i.args)}
|
53
|
+
|
54
|
+
if calls.any?
|
55
|
+
message = "The recorded interactions were:\n"
|
56
|
+
calls.each{|s| message << " - #{s}\n"}
|
57
|
+
message
|
58
|
+
else
|
59
|
+
"There were no interactions with this object.\n"
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
data/lib/bogus/injector.rb
CHANGED
@@ -4,7 +4,11 @@ module Bogus
|
|
4
4
|
look_in_modules Bogus
|
5
5
|
|
6
6
|
def configuration
|
7
|
-
@configuration ||=
|
7
|
+
@configuration ||= inject(Configuration)
|
8
|
+
end
|
9
|
+
|
10
|
+
def fake_configuration
|
11
|
+
@fake_configuration ||= inject(FakeConfiguration)
|
8
12
|
end
|
9
13
|
|
10
14
|
def search_modules
|
@@ -15,47 +19,65 @@ module Bogus
|
|
15
19
|
Bogus::RRProxy
|
16
20
|
end
|
17
21
|
|
22
|
+
def rr_shadow(object)
|
23
|
+
inject(Bogus::RRShadow, object: object)
|
24
|
+
end
|
25
|
+
|
18
26
|
def fake_registry
|
19
|
-
@fake_registry ||= inject(
|
27
|
+
@fake_registry ||= inject(FakeRegistry)
|
20
28
|
end
|
21
29
|
|
22
30
|
def creates_fakes
|
23
|
-
creates_fakes = inject(
|
24
|
-
inject(
|
31
|
+
creates_fakes = inject(CreatesFakes)
|
32
|
+
inject(RegistersCreatedFakes, creates_fakes: creates_fakes)
|
33
|
+
end
|
34
|
+
|
35
|
+
def create_double(object)
|
36
|
+
inject(Double, object: object)
|
25
37
|
end
|
26
38
|
|
27
39
|
def create_stub(object)
|
28
|
-
|
29
|
-
inject(Bogus::Double, object: object, double: stub)
|
40
|
+
create_double(object).stub
|
30
41
|
end
|
31
42
|
|
32
43
|
def create_mock(object)
|
33
|
-
|
34
|
-
inject(Bogus::Double, object: object, double: mock)
|
44
|
+
create_double(object).mock
|
35
45
|
end
|
36
46
|
|
37
|
-
def
|
38
|
-
inject(
|
47
|
+
def have_received_matcher
|
48
|
+
inject(HaveReceivedMatcher)
|
39
49
|
end
|
40
50
|
|
41
51
|
def interactions_repository
|
42
52
|
raise "Specify either real_interactions or stubbed_interactions"
|
43
53
|
end
|
44
54
|
|
55
|
+
def double_tracker
|
56
|
+
@double_tracker ||= inject(TracksExistenceOfTestDoubles)
|
57
|
+
end
|
58
|
+
|
59
|
+
def clear_tracked_doubles
|
60
|
+
@double_tracker = nil
|
61
|
+
end
|
62
|
+
|
45
63
|
def real_interactions
|
46
|
-
@real_interactions ||= inject(
|
64
|
+
@real_interactions ||= inject(InteractionsRepository)
|
47
65
|
end
|
48
66
|
|
49
67
|
def doubled_interactions
|
50
|
-
@doubled_interactions ||= inject(
|
68
|
+
@doubled_interactions ||= inject(InteractionsRepository)
|
69
|
+
end
|
70
|
+
|
71
|
+
def overwritten_classes
|
72
|
+
@overwritten_classes ||= inject(OverwrittenClasses)
|
51
73
|
end
|
52
74
|
|
53
75
|
def create_proxy_class(fake_name, klass)
|
54
|
-
inject(
|
76
|
+
inject(ProxyClass, fake_name: fake_name, klass: klass)
|
55
77
|
end
|
56
78
|
|
57
79
|
def create_recording_proxy(instance, fake_name)
|
58
|
-
inject(
|
80
|
+
inject(RecordingProxy,
|
59
81
|
instance: instance,
|
60
82
|
fake_name: fake_name,
|
61
83
|
interactions_repository: real_interactions)
|