Hi, On Wed, Jan 12, 2011 at 02:32, Lille <lille.pengu...@gmail.com> wrote: > I frequently use the -l option to run only tests of interest, but it's > messy in a way I don't understand... > > describe SomeModel do > > describe "#some_method" do > > it... # let's call this line 20 > > end > > describe "#some_other_method" do > > it... # here's some other test > > end > > end > > If I enter 'spec -l 20 spec/models/some_model_spec.rb' on the command > line, I get my line 20 test and others -- say the other test, above -- > why?
I think that's because line 20 is contained within another group (ie: inside describe "#some_method" do), so all examples from this group are run. Try running your tests with -l 21 (ie: the first line contained within the it of the test you want to run); that should run only that test. Mike _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users