Is there any reason why the ModelExampleGroup in rspec-rails inherits from ActiveSupport::TestCase and not ActiveRecord::TestCase? I noticed this because I tried to use assert_queries in one of my specs and obviously it told me it didn''t know what that was. Not a huge problem, I can always add assert_queries (or an equivalent) manually, I was just curious. -- Elliot
David Chelimsky
2009-Oct-14 18:18 UTC
[rspec-users] Model specs and ActiveRecord::TestCase
On Wed, Oct 14, 2009 at 3:01 PM, Elliot Winkler <elliot.winkler at gmail.com> wrote:> Is there any reason why the ModelExampleGroup in rspec-rails inherits from > ActiveSupport::TestCase and not ActiveRecord::TestCase? I noticed this > because I tried to use assert_queries in one of my specs and obviously it > told me it didn''t know what that was. Not a huge problem, I can always add > assert_queries (or an equivalent) manually, I was just curious.Pure oversight. Wanna submit a patch? https://rspec.lighthouseapp.com/projects/5645-rspec/overview> > -- Elliot > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Actually it seems someone read my mind... just tried out the patch in #896 and it seems to work great. So, problem solved ;) -- Elliot On 10/14/09 1:18 PM, David Chelimsky wrote:> On Wed, Oct 14, 2009 at 3:01 PM, Elliot Winkler > <elliot.winkler at gmail.com> wrote: > >> Is there any reason why the ModelExampleGroup in rspec-rails inherits from >> ActiveSupport::TestCase and not ActiveRecord::TestCase? I noticed this >> because I tried to use assert_queries in one of my specs and obviously it >> told me it didn''t know what that was. Not a huge problem, I can always add >> assert_queries (or an equivalent) manually, I was just curious. >> > Pure oversight. Wanna submit a patch? > https://rspec.lighthouseapp.com/projects/5645-rspec/overview > > >> -- Elliot >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >