Skip to content
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

Make aruba compatible with rspec + capybara #288

Closed
ghost opened this issue Jul 15, 2015 · 5 comments
Closed

Make aruba compatible with rspec + capybara #288

ghost opened this issue Jul 15, 2015 · 5 comments

Comments

@ghost
Copy link

ghost commented Jul 15, 2015

RSpec::Matchers and Capybara both implement the same methods at some extend - e.g. all, within. Find a way to work around this problem:

  • Looping over all items
  • Ask for help from Rspec-guys, rspec/rspec-expectations#820
@mattwynne
Copy link
Member

What does this have to do with aruba? Don't those projects need to work it out between themselves?

@ghost
Copy link
Author

ghost commented Jul 16, 2015

Mmmh... It's a little bit more complicated. I started to move all asserts etc. to be RSpec-matchers. And I really really like that approach and think this is the best way to go. As we rely heavily on rspec-expectations users will have problems if they use capybara + aruba in their project and want to upgrade to 0.8.0.

I think it's no a problem we can solve, but we can make it worse for users. And btw. I'm involved in middleman as well, and I was the person who introduced Capybara to their test suite and really want them to upgrade to 0.8.0. :-) Some advertising.

@mattwynne
Copy link
Member

For Aruba users, we could avoid the problem mixing the RSpec expectations module into a bare object that we then use to do our assertions.

e.g.:

match = Object.new.extend(RSpec::Expectations::Matchers) # or whatever
expect(output).to match.all(blah)

I think the less we can pollute the users's namespace the better anyway.

@ghost
Copy link
Author

ghost commented Jul 16, 2015

Good idea, but that would be a breaking change. And it fails for the be_-matcher.

@ghost
Copy link
Author

ghost commented Nov 13, 2015

Fixed with 0.9.0 or 0.10.0

@ghost ghost closed this as completed Nov 13, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant