Permalink
Browse files

Moved param tests to a dedicated file

  • Loading branch information...
1 parent dbbb6d0 commit 9126faa4d0ea2473d6ce3a75b12b02ae94d9940b @rzhw rzhw committed Apr 9, 2011
Showing with 24 additions and 14 deletions.
  1. +3 −0 Fructose.Test/Fructose.Test.csproj
  2. +0 −14 Fructose.Test/Tests/Blocks.rb
  3. +21 −0 Fructose.Test/Tests/Params.rb
@@ -95,6 +95,9 @@
<None Include="Tests\ParallelAssignment.rb">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
+ <None Include="Tests\Params.rb">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </None>
<None Include="Tests\PHPCall.rb">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
@@ -3,8 +3,6 @@
#42
#hello world
#test
-#tester
-#testing
class A
def bar
@@ -54,16 +52,4 @@ def yielder(x)
yielder nil do
puts a
end
-end
-
-def yielder_opt(x, y="er")
- yield x + y
-end
-
-yielder_opt "test" do |a|
- puts a
-end
-
-yielder_opt "test", "ing" do |a|
- puts a
end
@@ -0,0 +1,21 @@
+#TEST EXPECTS:
+#tester
+#test
+#testing
+#testing 2: test harder
+#testing with a vengeance
+
+def optional(x, y="er")
+ puts x + y
+end
+
+optional "test"
+optional "test", ""
+
+def splats(x, y="ing", *z)
+ puts x + y + z.join
+end
+
+splats "test"
+splats "test", "ing 2: test harder"
+splats "test", "ing", " w", "i", "t", "h ", "a vengeance"

0 comments on commit 9126faa

Please sign in to comment.