[Rails-core] How does ActiveRecord::TestFixtures::ClassMethods#run_in_transaction? work?

2015-03-05 Thread Brandon Weiss
Here's the method: def run_in_transaction? use_transactional_fixtures && !self.class.uses_transaction?(method_name) end I'm super confused. What is `method_name`? And where does it come from? It's not a local variable. I can find two instances of `def method_name` in the repo and neither

Re: [Rails-core] How does ActiveRecord::TestFixtures::ClassMethods#run_in_transaction? work?

2015-03-08 Thread Matt Jones
On Mar 6, 2015, at 12:59 AM, Brandon Weiss wrote: > Here's the method: > > def run_in_transaction? > use_transactional_fixtures && > !self.class.uses_transaction?(method_name) > end > > I'm super confused. What is `method_name`? And where does it come from? It's > not a local variable.

Re: [Rails-core] How does ActiveRecord::TestFixtures::ClassMethods#run_in_transaction? work?

2015-03-10 Thread Brandon Weiss
Aha! I hadn't thought to look on `TestCase`. Thanks! On Sunday, March 8, 2015 at 4:37:15 PM UTC-7, Matt jones wrote: > > > On Mar 6, 2015, at 12:59 AM, Brandon Weiss > wrote: > > Here's the method: > > def run_in_transaction? > use_transactional_fixtures && > !self.class.uses_transaction?(m