test/unit/executable_test.rb in sprout-1.0.25.pre vs test/unit/executable_test.rb in sprout-1.0.26.pre

- old
+ new

@@ -215,11 +215,32 @@ assert_equal 'bin/SomeFile.swf', @tool.output assert_equal "-output=bin/SomeFile.swf -source-path+=test/fixtures/executable/src test/fixtures/executable/src/Main.as", @tool.to_shell end end + should "add libraries as provided" do + as_a_unix_system do + + Sprout::Library.stubs(:define_path_task) + task 'abcd' + task 'bin/OtherFileTask.swf' + + asunit_lib = OpenStruct.new :name => :asunit4, :project_paths => ['lib/AsUnit-4.4.2.swc'] + Sprout::Library.register asunit_lib + + library :asunit4 + + @tool = mxmlc 'bin/SomeFile.swf' => [:asunit4, 'abcd', 'bin/OtherFileTask.swf'] do |t| + t.source_path << 'test/fixtures/executable/src' + t.input = 'test/fixtures/executable/src/Main.as' + end + assert_equal "-library-path+=lib/AsUnit-4.4.2.swc -output=bin/SomeFile.swf -source-path+=test/fixtures/executable/src test/fixtures/executable/src/Main.as", @tool.to_shell + end + end + should "accept configuration with prereqs as a file task" do as_a_unix_system do + task :clean task :other_task @tool = mxmlc 'bin/SomeFile.swf' => [:clean, :other_task] do |t| t.source_path << 'test/fixtures/executable/src' t.input = 'test/fixtures/executable/src/Main.as' end