Skip to content

Commit 535b57e

Browse files
committed
1 parent 17c894e commit 535b57e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/rspec/rails/mocks.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@ def mock_model(model_class, options_and_stubs = {})
2020
derived_name = "#{model_class.name}_#{id}"
2121
m = mock(derived_name, options_and_stubs)
2222
m.__send__(:__mock_proxy).instance_eval <<-CODE
23-
def @target.as_new_record
23+
def @object.as_new_record
2424
self.stub(:id) { nil }
2525
self.stub(:to_param) { nil }
2626
self.stub(:new_record?) { true }
2727
self
2828
end
29-
def @target.is_a?(other)
29+
def @object.is_a?(other)
3030
#{model_class}.ancestors.include?(other)
3131
end
32-
def @target.kind_of?(other)
32+
def @object.kind_of?(other)
3333
#{model_class}.ancestors.include?(other)
3434
end
35-
def @target.instance_of?(other)
35+
def @object.instance_of?(other)
3636
other == #{model_class}
3737
end
38-
def @target.class
38+
def @object.class
3939
#{model_class}
4040
end
41-
def @target.to_s
41+
def @object.to_s
4242
"#{model_class.name}_#{id}"
4343
end
4444
CODE

0 commit comments

Comments
 (0)