Rails主机路由Rspec测试

时间:2011-09-12 20:29:06

标签: ruby-on-rails ruby ruby-on-rails-3 rspec rspec2

是否可以为从this blog派生的以下路由编写RSpec路由测试?

constraints(:host => "example.com") do
  match "(*x)" => redirect { |params, request|
    URI.parse(request.url).tap { |x| x.host = "www.example.com" }.to_s
  }
end

0 个答案:

没有答案