test/unit/action/base_router_tests.rb in much-rails-0.2.3 vs test/unit/action/base_router_tests.rb in much-rails-0.2.4
- old
+ new
@@ -78,17 +78,17 @@
should "not implement #apply_to" do
assert_that{ subject.apply_to("TEST SCOPE") }.raises(NotImplementedError)
end
should "build path/URL strings for named URLs" do
- path_string = subject.path_for(:url1, "TEST PATH ARGS")
+ path_string = subject.path_for(:url1, test: "args")
assert_that(path_string).equals("TEST PATH STRING")
- assert_that(@url_set_path_for_call.args).equals([:url1, "TEST PATH ARGS"])
+ assert_that(@url_set_path_for_call.args).equals([:url1, { test: "args" }])
- url_string = subject.url_for(:url1, "TEST URL ARGS")
+ url_string = subject.url_for(:url1, test: "args")
assert_that(url_string).equals("TEST URL STRING")
- assert_that(@url_set_url_for_call.args).equals([:url1, "TEST URL ARGS"])
+ assert_that(@url_set_url_for_call.args).equals([:url1, { test: "args" }])
end
should "define request types" do
proc = ->(request){}
request_type = subject.request_type(:type1, &proc)
@@ -378,17 +378,17 @@
assert_that{ subject.url_for(:url1) }.raises(ArgumentError)
assert_that(ex.message).equals("There is no URL named `:url1`.")
subject.add(:url1, Factory.url)
- path_string = subject.path_for(:url1, "TEST PATH ARGS")
+ path_string = subject.path_for(:url1, test: "args")
assert_that(path_string).equals("TEST PATH STRING")
- assert_that(@url_path_for_call.args).equals(["TEST PATH ARGS"])
+ assert_that(@url_path_for_call.args).equals([{ test: "args" }])
- url_string = subject.url_for(:url1, "TEST URL ARGS")
+ url_string = subject.url_for(:url1, test: "args")
assert_that(url_string).equals("TEST URL STRING")
- assert_that(@url_url_for_call.args).equals(["TEST URL ARGS"])
+ assert_that(@url_url_for_call.args).equals([{ test: "args" }])
end
end
class BaseURLUnitTests < UnitTests
desc "BaseURL"
@@ -448,11 +448,11 @@
assert_that(subject.name)
.equals(base_url_class.url_name(router1, url_name1))
assert_that(subject.path)
.equals(base_url_class.url_path(router1, url_path1))
- assert_that{ subject.path_for("TEST ARGS") }.raises(NotImplementedError)
- assert_that{ subject.url_for("TEST ARGS") }.raises(NotImplementedError)
+ assert_that{ subject.path_for(test: "args") }.raises(NotImplementedError)
+ assert_that{ subject.url_for(test: "args") }.raises(NotImplementedError)
end
end
class DefinitionUnitTests < UnitTests
desc "Definition"