require 'test/helper' class TypusHelperTest < ActiveSupport::TestCase include TypusHelper include ActionView::Helpers::UrlHelper include ActionView::Helpers::TextHelper include ActionController::UrlWriter def test_applications assert true end def test_resources assert true end def test_typus_block_when_partial_does_not_exist output = typus_block(:resource => 'posts', :location => 'sidebar', :partial => 'pum') assert output.nil? end def test_page_title params = {} options = { :app_name => 'whatistypus.com' } Typus::Configuration.stubs(:options).returns(options) output = page_title('custom_action') assert_equal 'whatistypus.com › Custom action', output end def test_header_with_root_path # Add root named route ActionController::Routing::Routes.add_named_route :root, "/", { :controller => "posts" } # ActionView::Helpers::UrlHelper does not support strings, which are returned by named routes # link root_path self.stubs(:link_to).returns(%(View site)) output = header expected = <<-HTML
This is the message.
chunky bacon