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
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to