The methods are the same ; they are provided so that the readings in English are better based on the test of your test. Consider these two:
describe Array do describe "with 3 items" do before { @arr = [1, 2, 3] } specify { @arr.should_not be_empty } specify { @arr.count.should eq(3) } end end describe Array do describe "with 3 items" do subject { [1, 2, 3] } it { should_not be_empty } its(:count) { should eq(3) } end end
Michelle Tilley Dec 13 '11 at 4:22 2011-12-13 04:22
source share