Permalink
Browse files

fix data/examples/sample.rb

  • Loading branch information...
1 parent c709bbc commit f89d507232f0cbd400af8dc39245f8bef486ea6a Daisuke IKEGAMI committed Apr 8, 2011
Showing with 7 additions and 6 deletions.
  1. +7 −6 data/examples/sample.rb
@@ -2,11 +2,6 @@
require 'rushcheck'
-# first boring example
-def assert_sort
- RushCheck::Assertion.new { [].sort == [] }.check
-end
-
# assert_sort_one should be true
def assert_sort_one
RushCheck::Assertion.new(Integer) { |x|
@@ -33,7 +28,7 @@ def assert_sort_two_sorted
}.check
end
-# watch statistics
+# watch statistics
def assert_sort_two_sorted_trivial
RushCheck::Assertion.new(Integer, Integer) { |x, y|
RushCheck::guard {x <= y}
@@ -50,3 +45,9 @@ def assert_sort_two_sorted_classify
classify('bit diff') { (x - y).abs == 1 }
}.check
end
+
+# Because Assertion.new has to take at least one variable,
+# the following example should be failed.
+# def assert_sort
+# RushCheck::Assertion.new { [].sort == [] }.check
+# end

0 comments on commit f89d507

Please sign in to comment.