Model specs and ActiveRecord::TestCase

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

On Wed, Oct 14, 2009 at 3:01 PM, Elliot W.
[email protected] 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

Actually it seems someone read my mind… just tried out the patch in
#896 and it seems to work great. So, problem solved :wink:

– Elliot