search for: connection_hash

Displaying 1 result from an estimated 1 matches for "connection_hash".

2007 Nov 27
2
Expectations on Class Methods
Sorry about the non-specific subject. Here''s what I''m trying to do. I have a method: DataMapper::Database.setup That I want to create an expectation on. I wrote: DataMapper::Database.should_receive(:setup).once.and_return (connection_hash) The call to setup is invoked in the "Object" namespace. I.e., it is setup code, and not in any method or class. I can see that the class method is being called rather than the expectation. Is there something obvious I''m missing? Thanks, --s