[rspec-users] rspec-rails gem double quoting (My)SQL?

David Chelimsky dchelimsky at gmail.com
Wed Nov 18 15:07:48 EST 2009


On Tue, Nov 17, 2009 at 3:04 PM, David Nawara <lists at ruby-forum.com> wrote:

> Hi all,
>
> This seems like a plugin conflict (I haven't yet had success replicating
> this in a new project), but short version is: when I have "rspec-rails"
> in my environment.rb plugin config, table names are double quoted in
> mysql queries generated by my standard finders.
>
> rspec-rails commented out:
>
>  SELECT * FROM `users` WHERE (`users`.`id` = '159564615') LIMIT 1
>
> rspec-rails in enviroment.rb gem config:
>
>  SELECT * FROM "users" WHERE ("users"."id" = '159564615') LIMIT 1
>
> The double quotes break the SQL, and so no objects are returned from my
> queries.  This happened after I updated to 1.2.9 gem versions when I
> couldn't get cucumber (0.4.4) to look for git submodules in my project.
>
> Any ideas?  I'm pretty lost at the moment, and don't want to run without
> rspec (it makes me feel neked).
>
> Short version of my required gems:
>
> cucumber (0.4.4)
> mysql (2.8.1)
> rails (2.3.4)
> rspec (1.2.9)
> rspec-rails (1.2.9)
>
>
> /Dave


I really don't think this is an rspec-rails issue, though I'm certainly
happy to apply a patch if I'm wrong. The thing is that there is no code that
I'm aware of in the rspec-rails gem that would impact what sql is generated.

If you can find a way to repeat the error and zip up an app for me to look
at I'd be glad to.

Cheers,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20091118/0c171bb7/attachment.html>


More information about the rspec-users mailing list