Permalink
Browse files

add tests for code blocks

  • Loading branch information...
1 parent 6ddfa47 commit 11481e6d279805ab6578eee5485bfc546dc0a11c @rkh committed Aug 30, 2011
Showing with 22 additions and 0 deletions.
  1. +22 −0 test/bootstrap/ast/block_test.rb
@@ -0,0 +1,22 @@
+require File.expand_path('../../test_helper', __FILE__)
+MiniTest::Unit.autorun if $0 == __FILE__
+
+class ASTBlockTest < MiniTest::Unit::TestCase
+ include LiteralTest
+ literal Reak::AST::Block
+
+ parses "'foo'", "'foo'. Bar.", "Foo. Bar."
+ parses_not "Foo.. Bar.", "'foo' 'bar'"
+
+ evaluates("'foo'. Reak.AST") do |return_value|
+ assert_equal Reak::AST, return_value
+ end
+
+ evaluates("'foo'. Reak.AST.") do |return_value|
+ assert_equal Reak::AST, return_value
+ end
+
+ evaluates("Reak.AST.") do |return_value|
+ assert_equal Reak::AST, return_value
+ end
+end

0 comments on commit 11481e6

Please sign in to comment.