[rspec-users] undefined method `has_selector?' for "":String
win at wincent.com
Tue Sep 21 09:40:57 EDT 2010
El 21/09/2010, a las 13:55, David Chelimsky escribió:
> On Sep 21, 2010, at 4:57 AM, Lord Raiden wrote:
>> David Chelimsky wrote:
>> Reason I'm asking is I really want to write few view specs, (outside of
>> cucumber), and I would like not to use Webrat, to keep things clean.
> Why would Webrat be any less clean in this case? The matchers are pretty much the same, and that's all you need. Are you using Capybara in controller specs? If not, I'd recommend using Webrat with RSpec and Capybara with Cucumber.
I think the issue is that even though they are effectively the same in terms of their capabilities (ie. they both wrap Nokogiri AFAIK), the names of the matchers are slightly different so you end up having to use two different sets of language depending on whether you're writing view specs or acceptance specs. (This is probably less of an issue for Cucumber users because the Cucumber steps are another layer of abstraction over the top of the matchers, but if you're a Steak user, then you're always working directly with the matcher APIs).
I'm using Steak + Capybara right now for acceptance specs and Webrat for my view specs, but I'd prefer to be able to use Capybara matchers for everything in order to avoid the duplication of two very similar but slightly different APIs.
More information about the rspec-users