The issue is actually before getting to anything Capybara related.
It's coming from my call to member_path @member in my spec to
determine the route path to use. Looking at it this way the error
makes more sense. Not sure how much fudging I would need to do to
simulate there being a request there
Hm, make sure you have something like
MySuperApp::Application.configure do
routes.default_url_options = { :host = test.host, :protocol = 'https' }
end
in your config\environments\test.rb
On Sat, Nov 13, 2010 at 4:01 AM, Steve vertebr...@gmail.com wrote:
Thanks, that did it. I still have a
That didn't seem to change anything. I'll have to keep playing with
it, but if you have any other thoughts I'm all for it.
On Nov 13, 5:53 am, Evgeniy Dolzhenko dolze...@gmail.com wrote:
Hm, make sure you have something like
MySuperApp::Application.configure do
routes.default_url_options =
We're into some horrible throw-it-and-see-if-it-works loop now, but I
can tell you
here is what I use in my `before` blocks to test the subdomain routing
in controller specs:
request.env.merge!('HTTP_HOST' = 'hi5.test.host')
On Sat, Nov 13, 2010 at 7:54 PM, Steve vertebr...@gmail.com wrote:
We are indeed. There is no request var available in Capybara. I think
that is supposed to be taken care of by Capybara.default_host which I
have set, but still no dice. I see exciting times ahead trying to get
this working.
On Nov 13, 2:31 pm, Evgeniy Dolzhenko dolze...@gmail.com wrote:
We're
I'm writing some Steak acceptance tests in Rspec2 for my Rails3 app
and I can't access various route helpers(members_path,
new_member_path, etc...) in my specs, and can't figure out how to
include them. I'm sure it's probably a simple config setting. Does
anyone know what I need to do?
Thanks,
Not sure on how to do that with Steak but you must be looking to
include Rails.application.routes.url_helpers
somewhere, with vanilla RSpec it would be
describes 'included helpers' do
include Rails.application.routes.url_helpers
...
end
On Fri, Nov 12, 2010 at 8:42 PM, Steve
I went with:
config.include Rails.application.routes.url_helpers, :type
= :acceptance
but knowing what exactly to include was the important part. I still
have a nil error when url_for tries to call host_with_port on the
request object, but I think that has to do with my using subdomains
with
Thanks, that did it. I still have a nil error when trying to call
host_with_port on the request object inside url_for, but I think that
is related to my app having subdomains, and trying to use those with
capybara.
On Nov 12, 2:56 pm, Evgeniy Dolzhenko dolze...@gmail.com wrote:
Not sure on how