test/unit/view_handler_tests.rb in deas-0.24.1 vs test/unit/view_handler_tests.rb in deas-0.25.0
- old
+ new
@@ -3,11 +3,11 @@
require 'deas/test_helpers'
require 'deas/view_handler'
module Deas::ViewHandler
- class BaseTests < Assert::Context
+ class UnitTests < Assert::Context
include Deas::TestHelpers
desc "Deas::ViewHandler"
setup do
@handler = test_handler(TestViewHandler)
@@ -55,11 +55,11 @@
assert_equal ['layouts/app', 'layouts/web', 'layouts/search'], handler_class.layouts
end
end
- class CallbackTests < BaseTests
+ class CallbackTests < UnitTests
desc "callbacks"
setup do
@proc1 = proc{ '1' }
@proc2 = proc{ '2' }
@handler = Class.new{ include Deas::ViewHandler }
@@ -137,11 +137,11 @@
assert_equal @proc1, @handler.after_run_callbacks.last
end
end
- class WithMethodFlagsTests < BaseTests
+ class WithMethodFlagsTests < UnitTests
setup do
@handler = test_handler(FlagViewHandler)
end
should "have called `init!` and it's callbacks" do
@@ -165,11 +165,11 @@
assert_equal true, subject.after_run_called
end
end
- class HaltTests < BaseTests
+ class HaltTests < UnitTests
desc "halt"
should "return a response with the status code and the passed data" do
runner = test_runner(HaltViewHandler, :params => {
'code' => 200,
@@ -183,11 +183,11 @@
assert_equal 'test halting', runner.return_value.body
end
end
- class ContentTypeTests < BaseTests
+ class ContentTypeTests < UnitTests
desc "content_type"
should "should set the response content_type/charset" do
runner = test_runner(ContentTypeViewHandler)
content_type_args = runner.run
@@ -196,11 +196,11 @@
assert_equal({:charset => 'latin1'}, content_type_args.opts)
end
end
- class StatusTests < BaseTests
+ class StatusTests < UnitTests
desc "status"
should "should set the response status" do
runner = test_runner(StatusViewHandler)
status_args = runner.run
@@ -208,10 +208,10 @@
assert_equal 422, status_args.value
end
end
- class HeadersTests < BaseTests
+ class HeadersTests < UnitTests
desc "headers"
should "should set the response status" do
runner = test_runner(HeadersViewHandler)
headers_args = runner.run