New goodness, Capybara::RSpecMatchers in helper specs

This


is exciting news!! (“this adds capybara matchers to view and helper
specs”)

Now, if I just knew how to take advantage of it? Do I have to require
something else in spec_helper? I have already added included
gem ‘rspec-rails’, ‘~> 2.6.0.rc2’
gem ‘capybara’, ‘~> 1.0.0.beta1’
in my Gemfile, but in a helper, I still cannot get
helper.my_fantastic_tag.should have_selector(‘a’)
to work. Instead
undefined method `has_selector?’ for “test”:String
Seems like the Capybara::RSpecMatchers dont get included :frowning:

Any thoughts?

On Apr 26, 2011, at 8:54 AM, juwalter wrote:

This
https://github.com/rspec/rspec-rails/commit/59793dcc349b64f4ebcf742606371001256c774d
is exciting news!! (“this adds capybara matchers to view and helper
specs”)

Now, if I just knew how to take advantage of it? Do I have to require
something else in spec_helper? I have already added included
gem ‘rspec-rails’, ‘~> 2.6.0.rc2’

It’s not in any release, so you have to point to git:

gem ‘rspec-rails’, ‘~> 2.6.0.rc2’, :git =>
‘git://github.com/rspec/rspec-rails.git’

There will be a 2.6.0.rc3 within a week, and then 2.6.0 (final) within a
week or two of that.

HTH,
David

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs