Rodrigo Rosenfeld Rosas
2010-Jun-19 17:07 UTC
[rspec-users] rspec-rails 2 webrat dependency
Hi, I''ve finally make all my tests pass in Rails 3 with Capybara. After removing webrat''s dependency in favor of the new Capybara one, I expected that bundle install would remove Webrat dependencie. After a few minutes searching for bundler bugs related to removing dependencies I''ve tried to uninstall webrat gem. Then I understood that rspec-rails was depending on it... Is there any reason for that? If so, couldn''t Rspec use Capybara instead of Webrat if it is not present? Is it possible to depend on Webrat OR Capybara in the gem specs? Thank you all, specially David, for this wonderful piece of software that is Rspec! Best regards, Rodrigo. __________________________________________________ Fale com seus amigos de gra?a com o novo Yahoo! Messenger http://br.messenger.yahoo.com/
On Jun 19, 2010, at 12:07 PM, Rodrigo Rosenfeld Rosas wrote:> Hi, I''ve finally make all my tests pass in Rails 3 with Capybara. > > After removing webrat''s dependency in favor of the new Capybara one, I expected that bundle install would remove Webrat dependencie. > > After a few minutes searching for bundler bugs related to removing dependencies I''ve tried to uninstall webrat gem. Then I understood that rspec-rails was depending on it... > > Is there any reason for that? If so, couldn''t Rspec use Capybara instead of Webrat if it is not present? Is it possible to depend on Webrat OR Capybara in the gem specs? > > Thank you all, specially David, for this wonderful piece of software that is Rspec! > > Best regards, > > Rodrigo.There''s an open issue on this: http://github.com/rspec/rspec-rails/issues#issue/49 Just a matter of prioritization, and this super low on my priority list. Patches welcome.
On Sat, Jun 19, 2010 at 1:07 PM, Rodrigo Rosenfeld Rosas <lbocseg at yahoo.com.br> wrote:> Is there any reason for that? If so, couldn''t Rspec use Capybara instead of > Webrat if it is not present? Is it possible to depend on Webrat OR Capybara > in the gem specs?Gemspecs don''t allow alternative dependencies. I have a similar issue with the RiCal gem. It works with either the activesupport OR tzinfo gems, rather than require either I just document that it requires one or the other and leave it up to the user. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale
Rodrigo Rosenfeld Rosas
2010-Jun-22 01:00 UTC
[rspec-users] rspec-rails 2 webrat dependency
Em 19-06-2010 16:12, Rick DeNatale escreveu:> On Sat, Jun 19, 2010 at 1:07 PM, Rodrigo Rosenfeld Rosas > <lbocseg at yahoo.com.br> wrote: > >> Is there any reason for that? If so, couldn''t Rspec use Capybara instead of >> Webrat if it is not present? Is it possible to depend on Webrat OR Capybara >> in the gem specs? >> > Gemspecs don''t allow alternative dependencies. > > I have a similar issue with the RiCal gem. It works with either the > activesupport OR tzinfo gems, rather than require either I just > document that it requires one or the other and leave it up to the > user. >Maybe Rspec should keep depending on Webrat instead for allowing easy installation until Gemspecs support alternative dependencies. It is not that bad for those using Capybara and maybe Capybara will merge to Webrat anyway... Thank you for your information, Rodrigo. __________________________________________________ Fale com seus amigos de gra?a com o novo Yahoo! Messenger http://br.messenger.yahoo.com/