Permalink
Browse files

Strengthen specs a bit more

  • Loading branch information...
1 parent 3fe8374 commit 04f8b52a5a4372b3e022651f92c986f3772310c9 @alloy committed Aug 6, 2010
Showing with 3 additions and 0 deletions.
  1. +3 −0 spec/source_spec.rb
View
3 spec/source_spec.rb
@@ -140,11 +140,14 @@ def reflect(source)
it "returns whether or not the source contains a syntax error, except a code block not ending" do
reflect("def;").syntax_error?.should == true
reflect("def;").syntax_error?.should == true
+ reflect("{ [ } ]").syntax_error?.should == true
reflect("def foo").syntax_error?.should == false
reflect("class A; }").syntax_error?.should == true
reflect("class A; {" ).syntax_error?.should == false
+ reflect("class A; def {").syntax_error?.should == true
reflect("class A def foo").syntax_error?.should == true
reflect("class A; def foo" ).syntax_error?.should == false
+ reflect("def foo; {; end; }").syntax_error?.should == true
end
it "returns the actual syntax error message if one occurs" do

0 comments on commit 04f8b52

Please sign in to comment.