class EmptyUrlOptionsTest

Public Instance Methods

setup() click to toggle source
Calls superclass method
# File actionpack/test/controller/base_test.rb, line 301
def setup
  super
  @request.host = "www.example.com"
end
test_ensure_url_for_works_as_expected_when_called_with_no_options_if_default_url_options_is_not_set() click to toggle source
# File actionpack/test/controller/base_test.rb, line 306
def test_ensure_url_for_works_as_expected_when_called_with_no_options_if_default_url_options_is_not_set
  get :public_action
  assert_equal "http://www.example.com/non_empty/public_action", @controller.url_for
end
test_named_routes_with_path_without_doing_a_request_first() click to toggle source
# File actionpack/test/controller/base_test.rb, line 311
def test_named_routes_with_path_without_doing_a_request_first
  @controller = EmptyController.new
  @controller.request = @request

  with_routing do |set|
    set.draw do
      resources :things
    end

    assert_equal "/things", @controller.send(:things_path)
  end
end