Displaying 3 results from an estimated 3 matches for "marked_for_destruct".
2010 Mar 24
2
Mock "Consent_6335" received unexpected message :marked_for_destruction? with (no args)
I have a mock object (Person) that is associated with another object
(my_object) through a belongs_to association. When I check whether
my_object is valid (my_object.should be_valid), I am getting an error
like the following:
Mock "Person_6338" received unexpected
message :marked_for_destruction? with (no args)
Checking the list of methods on the mock, "marked_for_destruction?" is
not listed. Is this this something that i should expect to always
stub?
As a check, I added
def @target.marked_for_destruction?
false
end
to the mock_model defini...
2009 Apr 09
1
method_exists? is missing?
In a controller run through webrick I do this:
@entity = Entity.new
print @entity.methods.sort.to_yaml
and I see this:
- logger
- mark_for_destruction
- marked_for_destruction?
- metaclass
- method
- method_missing
- methods
- new_record?
There is no method_exists? method. If I instead do this in a console
session, I see this:
$ script/console
>>
>> @entity = Entity.new
=> ...
>> print @entity.methods.sort.to_yaml
...
- logger
- mark_for_dest...
2010 Oct 03
2
rspec-1.3.1.rc and rspec-rails-1.3.3.rc are released!
...#39;'tap'' (to quite rails-2.3.9 deprecation warnings)
* bug fixes
* support message expectation on template.render with locals (Sergey
Nebolsin). Closes #941.
* helper instance variable no longer persists across examples
(alex rothenberg). Closes #627.
* mock_model stubs marked_for_destruction? (returns false).
===================================================================