running single shoulda tests from the command line

53 views
Skip to first unread message

Dev Purkayastha

unread,
Aug 15, 2008, 12:10:10 PM8/15/08
to shoulda
I just jsut found out how to run single tests from the commandline.
Regexes!

class SomeTest
def test_this; p "this"; end
should "do that"; p "that"; end
context "a context"
should "do some thing"; p "some"; end
should "do another thing"; p "another"; end
end
end

ruby some_test.rb -n "test_this" #=> "this"
ruby some_test.rb -n "/that/" #=> "that"
ruby some_test.rb -n "/a con/" #=> "some", "another"

-d
Reply all
Reply to author
Forward
0 new messages