New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capybara and have_selector #190
Comments
The generators only support webrat at this time. Capybara and webrat have different APIs, so you have to change |
Thank you! :) |
Does everything else work? |
Actually no it doesn't work. I get a similar error: for
I also tried have_content("home") but the same error:
|
Just checked Capybara docs, and it doesn't really have an equivalent I think. It seems to favor XPATH. So I need to use have_xpath() However this throws a similar error:
So after some more digging I found that this works:
But this looks like a integration test, and I was looking for checking the output in a controller test, is there way I can use get '/' followed by response.should have_xpath() ? I'm sorry if I'm asking silly questions, but I can't seem to find any particular information on this. |
Wait, if I'm using capybara instead of webrat, then I should be using it's methods? I thought get() was provided by RSpec. Sorry, RSpec newbie here. |
|
I get the following failure:
With the following request spec:
I haven't tried with webrat but shouldn't capybara work?
I have gem 'capybara' in the Gemfile, is there any other configuration that I should do?
Using Rails 3.0.0 on Ruby 1.9.2-p0
The text was updated successfully, but these errors were encountered: