[rspec-users] RSpec raising routing errors where Rails doesn't?

RSL ___ lists at ruby-forum.com
Wed Aug 20 12:24:53 EDT 2008


I gave up on solving this. Very very strange that it even occurs. 
Stranger still that I circumvented the problem by writing a view helper 
to construct the url like this:

  def private_fund_form_url(fund)
    if fund.new_record?
      funds_url(:host => PRIVATE_HOST)
    else
      fund_url(fund, :host => PRIVATE_HOST)
    end
  end

[which is what the form_for should have been doing internally anyhow] 
and specing it in isolation. It passes in the helper specs so I just 
stub out the helper call in the view specs and all is well. Thanks again 
for your help, David.

RSL
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list