Sha256: 7f036d33c26135dce7879296e0443ac2c7b253da50ea48cd2d7806666545ec9a

Contents?: true

Size: 823 Bytes

Versions: 14

Compression:

Stored size: 823 Bytes

Contents

require 'assert'
require 'deas/test_helpers'
require 'test/support/view_handlers'
require 'deas/route_proxy'

class Deas::RouteProxy

  class BaseTests < Assert::Context
    desc "Deas::RouteProxy"
    setup do
      @proxy = Deas::RouteProxy.new('TestViewHandler')
    end
    subject{ @proxy }

    should have_reader :handler_class_name
    should have_imeths :handler_class

    should "know its handler class name" do
      assert_equal 'TestViewHandler', subject.handler_class_name
    end

    should "know its handler class" do
      assert_equal TestViewHandler, subject.handler_class
    end

    should "complain if there is no handler class with the given name" do
      assert_raises(Deas::NoHandlerClassError) do
        Deas::RouteProxy.new('SomethingNotDefined').handler_class
      end
    end

  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
deas-0.24.1 test/unit/route_proxy_tests.rb
deas-0.24.0 test/unit/route_proxy_tests.rb
deas-0.23.4 test/unit/route_proxy_tests.rb
deas-0.23.3 test/unit/route_proxy_tests.rb
deas-0.23.2 test/unit/route_proxy_tests.rb
deas-0.23.1 test/unit/route_proxy_tests.rb
deas-0.23.0 test/unit/route_proxy_tests.rb
deas-0.22.1 test/unit/route_proxy_tests.rb
deas-0.22.0 test/unit/route_proxy_tests.rb
deas-0.21.0 test/unit/route_proxy_tests.rb
deas-0.20.0 test/unit/route_proxy_tests.rb
deas-0.19.0 test/unit/route_proxy_tests.rb
deas-0.18.0 test/unit/route_proxy_tests.rb
deas-0.17.1 test/unit/route_proxy_tests.rb