From: James Gray Date: 2009-02-02T01:41:45+09:00 Subject: Re: [ANN] test/spec 0.10, a BDD interface for Test::Unit On Feb 1, 2009, at 6:44 AM, Phlip wrote: > We use TextMate at work. > When we put a cursor inside a def test_case and claw +R>, TextMate finds the 'def test_case' above us, and runs ruby -n > file_name/test_case. > > That gives us Incremental Testing during our Test-Driven Development > sessions. > > We auditioned test/spec, and we have many specs still in producton, > but we found that did not always work. Sometimes it > runs the right spec, and sometimes the wrong one... Here are the regular expressions we use inside TextMate to find specs from test/spec: # test/spec. spec = $3 || $4 if lines.find { |line| line =~ /^\s*(specify| it)\s+('(.*)'|"(.*)")+\s*(\{|do)/ } context = $3 || $4 if lines.find { |line| line =~ /^\s*(context| describe)\s+('(.*)'|"(.*)")+\s*(\{|do)/ } If those need tweaking, let us know. James Edward Gray II