require File.join(File.dirname(__FILE__), 'test_helper') class FlashPlayerTaskTest < Test::Unit::TestCase include SproutTestCase context "A FlashPlayerTask" do setup do @swf = File.join(fixtures, 'AsUnit4.swf') end should "attempt to launch the Flash Player" do sys = FakeSystem.new @task = FlashPlayer::Task.new @task.logger = StringIO.new # Comment following lines to really launch the player: @task.stubs(:current_system).returns sys sys.expects(:open_flashplayer_with) @task.execute @swf end end end class FakeSystem def clean_path path path end def open_flashplayer_with player, swf end end