Sha256: 3b8a62085286bfb96d0b378e210825adb727ef151eea6adb9078b66a0a7d4bd7

Contents?: true

Size: 1.58 KB

Versions: 42

Compression:

Stored size: 1.58 KB

Contents

require 'test_helper'

class FlashPlayerTest < Test::Unit::TestCase
  include Sprout::TestHelper

  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

42 entries across 42 versions & 3 rubygems

Version Path
h4oflashsdk-1.0.13 test/unit/flashplayer_module_test.rb
h4oflashsdk-1.0.12 test/unit/flashplayer_module_test.rb
h4oflashsdk-1.0.11 test/unit/flashplayer_module_test.rb
h4oflashsdk-1.0.10 test/unit/flashplayer_module_test.rb
h4oflashsdk-1.0.9 test/unit/flashplayer_module_test.rb
h4oflashsdk-1.0.8 test/unit/flashplayer_module_test.rb
h4oflashsdk-1.0.7 test/unit/flashplayer_module_test.rb
h4oflashsdk-1.0.6 test/unit/flashplayer_module_test.rb
h4oflashsdk-1.0.5 test/unit/flashplayer_module_test.rb
h4oflashsdk-1.0.4 test/unit/flashplayer_module_test.rb
h4oflashsdk-1.0.3 test/unit/flashplayer_module_test.rb
h4oflashsdk-1.0.2 test/unit/flashplayer_module_test.rb
h4oflashsdk-1.0.1 test/unit/flashplayer_module_test.rb
h4oflashsdk-1.0.0 test/unit/flashplayer_module_test.rb
flashsdk_sqe-0.0.14 test/unit/flashplayer_module_test.rb
flashsdk_sqe-0.0.13 test/unit/flashplayer_module_test.rb
flashsdk_sqe-0.0.12 test/unit/flashplayer_module_test.rb
flashsdk_sqe-0.0.11 test/unit/flashplayer_module_test.rb
flashsdk_sqe-0.0.10 test/unit/flashplayer_module_test.rb
flashsdk_sqe-0.0.9 test/unit/flashplayer_module_test.rb