1
是否有任何現有的工具或命令來自動列出應用程序中的每個示例?自動列出所有Rspec示例
舉例來說,如果我有...
/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
查看此輸出將幫助我確認我測試了對我而言重要的所有行爲。
默認的RSpec輸出不是基本上這樣做嗎? –