Sha256: 3b5674c9a37071934f91466532d5282cca0939192e36ba05cd93eb8826fef6ce

Contents?: true

Size: 854 Bytes

Versions: 1

Compression:

Stored size: 854 Bytes

Contents

require "test_helper"

module ThemesForRails
  class ViewHelpersTest < ActionController::IntegrationTest
    include ThemesForRails::ViewHelpers

    include ActionView::Helpers::AssetTagHelper
    include ERB::Util
    include ActionView::Helpers::TagHelper

    def theme_name
      'default'
    end

    def config
      @config ||= stub({:perform_caching => false, :asset_path => "/assets", :asset_host => ''})
    end

    should 'delegate to stylesheet_link_tag' do
      assert_match /media=.screen/, theme_stylesheet_link_tag('cuac.css')
    end

    should 'delegate options (lazy testing, I know)' do
      assert_match /media=.print/, theme_stylesheet_link_tag('cuac.css', :media => 'print')
    end
    should 'delegate options in image_tag' do
      assert_match /width=.40/, theme_image_tag('image.css', :size => '40x50')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
themes_for_rails-0.4.1 test/view_helpers_test.rb