Sha256: a983fb7235618a89c57ce461500d829401e4b3e03c4bc7615fc04aacbf0f4202

Contents?: true

Size: 1.1 KB

Versions: 3

Compression:

Stored size: 1.1 KB

Contents

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

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

  context "An MMConfig" do

    setup do
      @fixture = File.join(fixtures, 'home')
      @osx_fp9 = File.join(@fixture, 'Application Support', 'Macromedia')

      FileUtils.mkdir_p @fixture
      FlashPlayer::MMConfig.any_instance.stubs(:user_confirmation?).returns true

      @mm_config = FlashPlayer::MMConfig.new
      @mm_config.logger = StringIO.new
    end

    teardown do
      remove_file @fixture
    end

    should "create a config file on OS X with FP 9" do
      FileUtils.mkdir_p @osx_fp9

      @mm_config.stubs(:system_library).returns @fixture
      @mm_config.stubs(:flashplayer_home).returns @osx_fp9
      @mm_config.create

      assert_file File.join(@osx_fp9, mm_config_file)
    end

    should "create a config file on OS X with FP 10+" do
      @mm_config.stubs(:system_home).returns @fixture
      @mm_config.create

      assert_file File.join(@fixture, mm_config_file)
    end
  end

  private

  def mm_config_file
    FlashPlayer::MMConfig::FILE_NAME
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
flashplayer-10.1.3.pre test/unit/mm_config_test.rb
flashplayer-10.1.2.pre test/unit/mm_config_test.rb
flashplayer-10.1.1.pre test/unit/mm_config_test.rb