[Rspec-devel] shall vs. should

Richard Kilmer rich at infoether.com
Mon Apr 24 19:49:25 EDT 2006


Just a vocabulary nit, but if you are "specifying" behavior is it not  
correct to say this object shall do or not do something rather than  
should?  I mean, you are in a sense specifying something akin to a  
contract, and all contracts that I have worked on use shall to  
indicate that its required and not optional.

context "An empty stack" do
   specify "should accept an item when sent push" do
     lambda { @stack.push Object.new }.should.not.raise
   end
end

would it not be more correct in saying:

context "An empty stack" do
   specify "shall accept an item when sent push" do
     lambda { @stack.push Object.new }.shall.not.raise
   end
end

Its more proper to say "An empty stack shall accept an item when sent  
push".  That is contractual language, asserting an absolute  
requirement, and these specs are either met or not (there is no grey  
area).

-rich


More information about the Rspec-devel mailing list