Skip to content

Instantly share code, notes, and snippets.

@ksob
Created August 7, 2011 15:58
Show Gist options
  • Save ksob/1130484 to your computer and use it in GitHub Desktop.
Save ksob/1130484 to your computer and use it in GitHub Desktop.
rails/actionpack/test/controller/url_for_test.rb
def test_without_protocol
add_host!
assert_equal('//www.basecamphq.com/c/a/i',
W.new.url_for(:controller => 'c', :action => 'a', :id => 'i', :protocol => '//')
)
assert_equal('//www.basecamphq.com/c/a/i',
W.new.url_for(:controller => 'c', :action => 'a', :id => 'i', :protocol => false)
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment