No More “Should”

March 4th, 2011

Why is it that RSpec scenarios like this are so popular:

it "should be awesome" do
  subject.should be_awesome
end

It “should”? It just sounds so unsure. While you’re at it, why not:

it "might be awesome" do
  subject.should be_awesome
end

or:

it "probably sucks but who knows" do
  subject.should be_awesome
end

Man up and tell your code what’s what:

it "is awesome" do
  subject.should be_awesome
end

Plus, it’s shorter.

blog comments powered by Disqus