Sha256: 2a903fc02c2ff0352897ac7962d4b3b41b3de85d4efeea5cb2611d6c7ed59529

Contents?: true

Size: 1.61 KB

Versions: 10

Compression:

Stored size: 1.61 KB

Contents

require File.join(File.dirname(__FILE__), 'test_helper')

class FlashPlayerTest < Test::Unit::TestCase
  include SproutTestCase

  context "The FlashPlayer module" do

    context "should find home" do

      setup do
        @fixture = File.join(fixtures, 'home')

        @osx_home1 = File.join(@fixture, 'Preferences', 'Macromedia', 'Flash Player')
        @osx_home2 = File.join(@fixture, 'Application Support', 'Macromedia')
        @win_home1 = File.join(@fixture, 'Application Data', 'Macromedia', 'Flash Player')
        @win_home2 = File.join(@fixture, 'AppData', 'Roaming', 'Macromedia', 'Flash Player')
        @nix_home1 = File.join(@fixture, '.macromedia', 'Flash_Player')

        # Ensure the looks in our Fixtures folder instead of system:
        FlashPlayer.stubs(:system_library).returns @fixture
        FlashPlayer.stubs(:system_home).returns @fixture
      end

      teardown do
        remove_file File.join(@fixture)
      end

      should "find home on osx" do
        FileUtils.mkdir_p @osx_home1
        assert_equal @osx_home1, FlashPlayer.home
      end

      should "find home on osx 2" do
        FileUtils.mkdir_p @osx_home2
        assert_equal @osx_home2, FlashPlayer.home
      end

      should "find home on win 1" do
        FileUtils.mkdir_p @win_home1
        assert_equal @win_home1, FlashPlayer.home
      end

      should "find home on win 2" do
        FileUtils.mkdir_p @win_home2
        assert_equal @win_home2, FlashPlayer.home
      end

      should "find home on nix 1" do
        FileUtils.mkdir_p @nix_home1
        assert_equal @nix_home1, FlashPlayer.home
      end
    end

  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
flashsdk-1.0.12.pre test/unit/flashplayer_module_test.rb
flashsdk-1.0.5.pre test/unit/flashplayer_test.rb
flashsdk-1.0.1.pre test/unit/flashplayer_test.rb
flashplayer-10.1.9.pre test/unit/flashplayer_test.rb
flashplayer-10.1.8.pre test/unit/flashplayer_test.rb
flashplayer-10.1.7.pre test/unit/flashplayer_test.rb
flashplayer-10.1.6.pre test/unit/flashplayer_test.rb
flashplayer-10.1.3.pre test/unit/flashplayer_test.rb
flashplayer-10.1.2.pre test/unit/flashplayer_test.rb
flashplayer-10.1.1.pre test/unit/flashplayer_test.rb