Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix for #360 #362

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

be9 commented May 3, 2011

No description provided.

@be9 be9 Require capybara after rspec/rails/example
Otherwise Capybara's includes are not set correctly.

Fixes #360
c19e295

@dchelimsky dchelimsky commented on the diff May 3, 2011

lib/rspec/rails/browser_simulators.rb
@@ -1,18 +1,3 @@
-begin
- require 'capybara/rspec'
-rescue LoadError
-end
-
-begin
- require 'capybara/rails'
-rescue LoadError
-end
-
-begin
- require 'webrat'
-rescue LoadError
-end
@dchelimsky

dchelimsky May 3, 2011

Owner

I'd rather keep this ^^ in this file. What about just reversing the inclusion order in rails.rb? Also, I'd like a spec for this to avoid regressions. I'm not sure of the best way to manage that yet. Got any ideas?

@be9

be9 May 3, 2011

Contributor

Unfortunately, inclusion order reversal doesn't work (that's the first thing I tried). BrowserSimulators module is used in Example, so it should be required first.

I'll come up with the spec later, but I still can't see a nicer solution. Load capybara from railtie, tied to a proper initializer?

@dchelimsky

dchelimsky May 3, 2011

Owner

Unfortunately this breaks capy support in controller, view, and helper specs. Looks like I'm going to need to rethink how/when capy and webrat get loaded.

@dchelimsky dchelimsky closed this in d0e790e May 4, 2011

Owner

dchelimsky commented May 4, 2011

I merged your commit, and then made some further changes in ec15a2f.

Let me know if you have any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment