On Tuesday, January 11, 2011 12:41:54 PM UTC-5, Ruby-Forum.com User wrote:
>
> Nick Hoffman wrote in post #973978:
> > BTW, it's best not to include the word "should" in your spec
> > descriptions.
> >     it 'validates the presence of "text"' do
> > is better because it's more descriptive.
>
> I don't agree.  Since RSpec's syntax uses "should" as a technical term, 
> I believe it should be in every spec description:
>
> it "should set the value to 2" do
>   value.should == 2
> end
>
> >
> > The word "should" is soft; it doesn't mean "fail if this isn't true",
> > which
> > is what we're trying to convey.
>
> "Should" as an RSpec technical term isn't soft at all.  It's "this 
> *should* be true.  If it is not, we have a problem."
>
I believe David Chelimsky (the original/primary author of RSpec) 
specifically said that spec descriptions should not begin with "should". I 
tried to find where he wrote that, but wasn't able to. However, take a look 
at David's examples:

http://blog.davidchelimsky.net/2010/11/07/specifying-mixins-with-shared-example-groups-in-rspec-2/
http://blog.davidchelimsky.net/2010/06/14/filtering-examples-in-rspec-2/
http://blog.davidchelimsky.net/2009/09/15/let-it-be-less/

None of those posts have "should" in a spec description.

The latest example on David's blog that uses "should" in a spec description 
is from 2008:
http://blog.davidchelimsky.net/2008/07/01/new-controller-examples/

However, this convo should be moved to the RSpec mailing list.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to