Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the RackTest driver override to capybara/rails
This change enables the `:respect_data_method` option from the RackTest driver for Rails projects that don't use RSpec.
- Loading branch information
1 parent
6446eac
commit 9c1dd62
Showing
3 changed files
with
13 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9c1dd62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about #478?
9c1dd62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is false by default, but true in
capybara/rails
where it makes more sense. Not sure I follow @tomstuart, can you please clarify?9c1dd62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There’s a discussion in #184 about making this behaviour opt-in so that nobody gets unexpectedly bitten by the
data-method
magic, and my expectation was that:respect_data_method => false
would be the default everywhere in Capybara 2.0. If there’s been another discussion about enabling it by default for Rails apps then I haven’t seen it.9c1dd62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, as far as I know, it's about #793 and telling everyone using Rails to add
respect_data_method
, since I believe it's more expected that it works this way within Rails helpers likelink_to
. I myself would make that change in my apps to usedata-method
withrack-test
, so that I wouldn't need a javascript driver to test such features. Anyway, I can't say more than that because I don't think I have enough background on capybara and related issues regarding this option :).9c1dd62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pointer, I hadn’t seen that pull request. I disagree with the change — a major version bump is the perfect opportunity to make this sort of simplification at the expense of backwards compatibility — but @jnicklas merged it, so I guess it’s happening!