Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

documentation should provider pointers to Webrat and Capybara #527

Closed
nbt opened this Issue · 11 comments

8 participants

@nbt
nbt commented

For the newbie, when trying to understand code examples (especially integration and requests tests), it's not clear which methods are defined by RSpec and which are defined by Webrat or Capybara.

It would be VERY helpful if the RSpec documentation provided pointers to the Webrat and Capybara documentation, and a brief explanation of the distinction between RSpec calls and Webrat/Capybara calls.

@conradwt

I'm looking for similar information because I'm in the process of configuring RSpec, Capybara, and FactoryGirl via the spec_helper.rb for a Rails application. For example, I wasn't able to find the RSpec.configure documentation. Thus, I'm just doing a lot of guessing by aggregating sources of information from the RSpec and Capybara projects.

@justinko

Webrat is dead. Use Capybara. Therefore, it should be easy to discern between RSpec "request helpers" and Capybara methods/matchers.

P.S. We will remove any support & mention of Webrat in RSpec 3. /cc @dchelimsky

@justinko justinko closed this
@nbt

I'll repeat my original comment, but with references to Webrat removed:

For the newbie, when trying to understand code examples (especially integration and requests tests), it's not clear which methods are defined by RSpec and which are defined by Capybara.

It would be VERY helpful if the RSpec documentation provided pointers to the Capybara documentation, and a brief explanation of the distinction between RSpec calls and Capybara calls.

You may, of course, disagree. But please don't dismiss the entire issue simply because it referenced Webrat. Thanks!

@justinko

For the newbie, when trying to understand code examples

What code examples are you referring to? Seriously.

It would be VERY helpful if the RSpec documentation provided pointers to the Capybara documentation

You can't Google "rails capybara" or "github capybara"? Why does RSpec need to proved a link to third party a library's documentation?

@dchelimsky
Owner

@justinko I think @rdpoor is talking about the fact that in a controller spec you can use get (Rails) and you can use visit (Capy), and depending on which you use you want to use response (Rails) or page (Capy). I think it's reasonable to make a brief note of this, pointing off to the Capy docs to learn more. Reopening. I'll take care of adding this.

@dchelimsky dchelimsky reopened this
@dchelimsky dchelimsky was assigned
@rdpoor

I note that in https://github.com/rspec/rspec-rails#request-specs, it now says:

[The above] example uses only standard Rails and RSpec API's, but many RSpec/Rails users like to use extension libraries like FactoryGirl and Capybara [as in the example below]:

I'd say this addition satisfies the original request eloquently, and you're welcome to close it. (Maybe you're leaving this open until you put something in the relish documentation as well, but consider me happy.)

@patmaddox

I added links to capybara and factory girl in the doc that rdpoor pointed to (63d9abc). And I suppose we should remove the reference to webrat altogether?

@dchelimsky
Owner

The code still supports Webrat integration. We should keep those docs around for now and consider a strategy for removing Webrat support entirely.

@alindeman
Collaborator

Anything else actionable here?

@dchelimsky
Owner

I don't think so.

@dchelimsky dchelimsky closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.