This project is archived and is in readonly mode.
let users decide what mock framework to use
-
Pratik
- Assigned user set to Jeremy Kemper
The best is probably just to not require mocha in any test cases. But Jeremy will probably have more thoughts on this.
-
David Chelimsky
Jeremy - any thoughts on this?
-
Jeremy Kemper
That'd be great. There's an older patch to do this that had to be reverted, though.
-
David Chelimsky
Jeremy, that patch seems to be trying to do something more implicit. Are you saying something explicit that supports end-user configuration would be great? Or just something that allows rails own tests to function properly without implicitly requiring mocha for end-users?
-
Jeremy Kemper
Right. Our fixtures code breaks if Mocha is loaded after ActiveSupport::TestCase because Mocha overwrites #run. A comment in test/test_helper.rb to require 'mocha' (or whatever mocking lib) before require 'test_help' should be enough (no config option needed.)
-
David Chelimsky
Hey Jeremy, I just pulled edge and see 27 failures in actionpack, 3 in actionmailer, 1 in activerecord (running against mysql)
Can you peek at http://gist.github.com/93003 and tell me if anything jumps out at you. I'm hoping there is simply something wrong in my environment that you'll recognize immediately from the particular sets of failures.
I don't want to start working on this until I have 100% passing tests so I know I don't break anything :)
Cheers, David
-
David Chelimsky
I don't think this is an issue any more with Rails 3 because the app developer needs to specify the mocha gem in the Gemfile to use it, so it won't be automatically loaded just because it is present on the file system.
If you agree, let's close this ticket.
-
Rohit Arondekar
What's the status on this ticket? Any more info?
-
José Valim
- State changed from new to invalid
Let's close this. I will be glad to reopen it if needed.