Split double test

This commit is contained in:
Ryan Fitzgerald 2012-08-07 21:03:51 -07:00
parent 9d5ae76fd4
commit 185bda1215
1 changed files with 5 additions and 1 deletions

View File

@ -59,8 +59,12 @@ describe Pry do
Pry::Code.complete_expression?("puts 1, 2,\n3").should == true
end
it "should not suppress the error output if the line ends in ;" do
mock_pry("raise RuntimeError, 'foo';").should =~ /RuntimeError/
end
it "should not clobber _ex_ on a SyntaxError in the repl" do
mock_pry("raise RuntimeError, 'foo';", "puts foo)", "_ex_.is_a?(RuntimeError)").should =~ /^RuntimeError.*\nSyntaxError.*\n=> true/m
mock_pry("raise RuntimeError, 'foo'", "puts foo)", "_ex_.is_a?(RuntimeError)").should =~ /^RuntimeError.*\nSyntaxError.*\n=> true/m
end
it "should allow whitespace delimeted strings" do