test/unit/flashplayer_task_test.rb in flashsdk-1.0.23.pre vs test/unit/flashplayer_task_test.rb in flashsdk-1.0.25.pre
- old
+ new
@@ -1,6 +1,7 @@
require 'test_helper'
+require 'fake_flashplayer_system'
class TaskTest < Test::Unit::TestCase
include Sprout::TestHelper
context "A FlashPlayerTask" do
@@ -13,12 +14,12 @@
load 'flashplayer/specification.rb'
@swf = File.join(fixtures, 'flashplayer', 'AsUnit Runner.swf')
@missing_home = File.join(fixtures, 'missing_folder')
@config_path = File.join(@missing_home, 'fp_config', 'mm.cfg')
- Sprout.stdout = $stdout
- Sprout.stderr = $stderr
+ #Sprout.stdout = $stdout
+ #Sprout.stderr = $stderr
end
teardown do
remove_file @missing_home
ENV['USE_FDB'] = 'false'
@@ -81,20 +82,10 @@
def configure_task t
t.logger = StringIO.new
# Comment following lines to really launch the player:
sys = FakeFlashPlayerSystem.new
- t.stubs(:current_system).returns sys
+ FlashPlayer::Executable.any_instance.stubs(:current_system).returns sys
sys.expects(:open_flashplayer_with).returns Thread.new{}
- end
-end
-
-class FakeFlashPlayerSystem
-
- def clean_path path
- path
- end
-
- def open_flashplayer_with player, swf
end
end