是否有任何现有的工具或命令可以自动列出应用程序中的每个示例?
例如,如果我有...
/spec/apple_spec.rb:
describe Apple do
it "should be round" do
@apple.shape.should == "round"
end
it "should be red" do
@apple.colour.should == "red"
do
end
/spec/banana_spec.rb:
describe Banana do
it "should be bent" do
@banana.shape.should == "bent"
end
it "should be yellow" do
@banana.colour.should == "yellow"
end
end
...然后我正在寻找的工具或命令会产生类似的东西:
apple_spec.rb
- describe apple
- it should be round
- it should be red
banana_spec.rb
- describe banana
- it should be bent
- it should be yellow
查看此输出将帮助我确认我已经测试了所有对我很重要的行为。