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-1.1.3 test/active_assets/active_sprites/sprites_test.rb
active_assets-1.1.2 test/active_assets/active_sprites/sprites_test.rb
active_assets-1.1.1 test/active_assets/active_sprites/sprites_test.rb
active_assets-1.0.3 test/active_assets/active_sprites/sprites_test.rb
active_assets-1.1.0 test/active_assets/active_sprites/sprites_test.rb
active_assets-0.3.1 test/active_assets/active_sprites/sprites_test.rb
active_assets-1.0.2 test/active_assets/active_sprites/sprites_test.rb
active_assets-1.0.1 test/active_assets/active_sprites/sprites_test.rb
active_assets-1.0.0 test/active_assets/active_sprites/sprites_test.rb
active_assets-0.3.0 test/active_assets/active_sprites/sprites_test.rb
active_assets-1.0.0.rc1 test/active_assets/active_sprites/sprites_test.rb
active_assets-0.2.8 test/active_assets/active_sprites/sprites_test.rb
active_assets-0.2.7 test/active_assets/active_sprites/sprites_test.rb
active_assets-0.2.6 test/active_assets/active_sprites/sprites_test.rb
active_assets-0.2.5 test/active_assets/active_sprites/sprites_test.rb
active_assets-0.2.4 test/active_assets/active_sprites/sprites_test.rb
active_assets-0.2.3 test/active_assets/active_sprites/sprites_test.rb
active_assets-0.2.2 test/active_assets/active_sprites/sprites_test.rb
active_assets-0.2.1 test/active_assets/active_sprites/sprites_test.rb
active_assets-0.2.0 test/active_assets/active_sprites/sprites_test.rb