[mocha-developer] Stubbing Constants

s.ross cwdinfo at gmail.com
Sun Jul 22 19:46:20 EDT 2007

This may sound odd, but here's the scenario: My Rails app behaves a  
bit differently in development versus production mode. Because Ruby  
won't let me redefine constants like RAILS_ENV I thought, hmmmmmmmm,  
maybe I can just stub it and then write tests that were mode specific.

Is this something that can be done with Mocha?


More information about the mocha-developer mailing list