Sha256: 27d6a7eb2c00d1932e28443637750c16f11b695ac5136ee472b21ec35b75a905

Contents?: true

Size: 730 Bytes

Versions: 24

Compression:

Stored size: 730 Bytes

Contents

require 'helper'

class SpritesTest < Test::Unit::TestCase
  def setup
    initialize_application_or_load_sprites!
  end

  def teardown
    tear_down_assets
  end

  def test_describe
    assert Rails.application.sprites.kind_of?(ActiveAssets::ActiveSprites::Sprites)
  end

  def test_all
    assert Rails.application.sprites.all.kind_of?(Array)
  end

  def test_sprite
    assert_nothing_raised do
       Rails.application.sprites do
         sprite :foo
       end
     end
  end

  def test_sprite_with_mapping
    Rails.application.sprites do
      sprite 'sprites/global.png' => 'sprites/global.css'
    end

    assert_equal 'sprites/global.css', Rails.application.sprites['sprites/global.png'].stylesheet_path
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
active_assets-0.2.0.rc4 test/active_assets/active_sprites/sprites_test.rb
active_assets-0.2.0.rc3 test/active_assets/active_sprites/sprites_test.rb
active_assets-0.2.0.rc2 test/active_assets/active_sprites/sprites_test.rb
active_assets-0.2.0.rc test/active_assets/active_sprites/sprites_test.rb