Rails 2.2.2
Updated to Rails 2.2.2. Added a couple more Ruby 1.9 fixes, but that's pretty much at a standstill, until one gets Maruku and HTML5lib working right under Ruby 1.9.
This commit is contained in:
parent
1b69b148de
commit
2e81ca2d30
716 changed files with 8009 additions and 113047 deletions
|
@ -706,12 +706,13 @@ uses_mocha 'LegacyRouteSet, Route, RouteSet and RouteLoading' do
|
|||
port = options.delete(:port) || 80
|
||||
port_string = port == 80 ? '' : ":#{port}"
|
||||
|
||||
host = options.delete(:host) || "named.route.test"
|
||||
anchor = "##{options.delete(:anchor)}" if options.key?(:anchor)
|
||||
protocol = options.delete(:protocol) || "http"
|
||||
host = options.delete(:host) || "named.route.test"
|
||||
anchor = "##{options.delete(:anchor)}" if options.key?(:anchor)
|
||||
|
||||
path = routes.generate(options)
|
||||
|
||||
only_path ? "#{path}#{anchor}" : "http://#{host}#{port_string}#{path}#{anchor}"
|
||||
only_path ? "#{path}#{anchor}" : "#{protocol}://#{host}#{port_string}#{path}#{anchor}"
|
||||
end
|
||||
|
||||
def request
|
||||
|
@ -1726,6 +1727,11 @@ uses_mocha 'LegacyRouteSet, Route, RouteSet and RouteLoading' do
|
|||
assert_equal "http://some.example.com/people/5", controller.send(:show_url, 5, :host=>"some.example.com")
|
||||
end
|
||||
|
||||
def test_named_route_url_method_with_protocol
|
||||
controller = setup_named_route_test
|
||||
assert_equal "https://named.route.test/people/5", controller.send(:show_url, 5, :protocol => "https")
|
||||
end
|
||||
|
||||
def test_named_route_url_method_with_ordered_parameters
|
||||
controller = setup_named_route_test
|
||||
assert_equal "http://named.route.test/people/go/7/hello/joe/5",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue