[rspec-users] when using command line -l, why do tests from other describe blocks run?

Lille lille.penguini at gmail.com
Tue Jan 11 13:32:01 EST 2011


Hi,

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?

Thanks,

Lille


More information about the rspec-users mailing list