File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -20,25 +20,25 @@ def mock_model(model_class, options_and_stubs = {})
20
20
derived_name = "#{ model_class . name } _#{ id } "
21
21
m = mock ( derived_name , options_and_stubs )
22
22
m . __send__ ( :__mock_proxy ) . instance_eval <<-CODE
23
- def @target .as_new_record
23
+ def @object .as_new_record
24
24
self.stub(:id) { nil }
25
25
self.stub(:to_param) { nil }
26
26
self.stub(:new_record?) { true }
27
27
self
28
28
end
29
- def @target .is_a?(other)
29
+ def @object .is_a?(other)
30
30
#{ model_class } .ancestors.include?(other)
31
31
end
32
- def @target .kind_of?(other)
32
+ def @object .kind_of?(other)
33
33
#{ model_class } .ancestors.include?(other)
34
34
end
35
- def @target .instance_of?(other)
35
+ def @object .instance_of?(other)
36
36
other == #{ model_class }
37
37
end
38
- def @target .class
38
+ def @object .class
39
39
#{ model_class }
40
40
end
41
- def @target .to_s
41
+ def @object .to_s
42
42
"#{ model_class . name } _#{ id } "
43
43
end
44
44
CODE
You can’t perform that action at this time.
0 commit comments