spec/testrbl_spec.rb in testrbl-0.5.2 vs spec/testrbl_spec.rb in testrbl-0.6.0

- old
+ new

@@ -550,11 +550,11 @@ end end describe ".test_pattern_from_line" do def call(line) - Testrbl.test_pattern_from_line(line) + Testrbl.send(:test_pattern_from_line, line) end it "finds simple tests" do call(" def test_xxx\n").should == [" ", "xxx"] end @@ -601,15 +601,21 @@ it "finds interpolated context do calls" do call(" context \"c\#{111}b\" do\n").should == [" ", "c.*b"] end - it "finds minitest it do calls" do - call(" it \"xx xx\" do\n").should == [" ", "#test_\\d+_xx xx$"] - end + describe "minitest id do" do + it "finds simple" do + call(" it \"xx xx\" do\n").should == [" ", "#test_\\d+_xx xx$"] + end - it "finds complex minitest it do calls" do - call(" it \"xX ._-.. ___ Xx\" do\n").should == [" ", "#test_\\d+_xX ._-.. ___ Xx$"] + it "finds complex" do + call(" it \"xX ._-.. ___ Xx\" do\n").should == [" ", "#test_\\d+_xX \\._\\-\\.\\. ___ Xx$"] + end + + it "finds with pecial characters" do + call(" it \"hmm? it's weird\\\"?\" do\n").should == [" ", "#test_\\d+_hmm\\? it.s weird\\\\\"\\?$"] + end end it "finds minitest describe do calls" do call(" describe Foobar do\n").should == [" ", "Foobar(::)?"] end