test/unit/executable_test.rb in sprout-1.0.11.pre vs test/unit/executable_test.rb in sprout-1.0.13.pre
- old
+ new
@@ -15,10 +15,22 @@
@tool.boolean_param = true
assert @tool.boolean_param
assert_equal "--boolean-param", @tool.to_shell
end
+ should "serialize to a hash" do
+ @tool.boolean_param = true
+ hash = @tool.to_hash
+ assert_equal true, hash[:boolean_param]
+ end
+
+ should "serialize from a hash" do
+ hash = { :boolean_param => true }
+ @tool.from_hash hash
+ assert_equal true, @tool.boolean_param
+ end
+
should "accept a string param" do
@tool.string_param = "string1"
assert_equal "string1", @tool.string_param
assert_equal "--string-param=string1", @tool.to_shell
end
@@ -239,7 +251,8 @@
@tool.input = 'test/fixtures/executable/src/Main.as'
file_task = @tool.to_rake('bin/SomeProject.swf')
assert_equal 2, file_task.prerequisites.size
end
end
+
end