[rspec-users] Wording describe/it so specdocs look good
don at donpetersen.net
Thu Jul 5 16:25:28 EDT 2007
I have no idea what the business logic is, but I guess I see a few
words there which could be more concise.
"should not allow" could become "disallows". Not much shorter, but I
don't think it's written anywhere that everything must to start with
"the same user to rate the same agent twice" could become "duplicate
Agent disallows duplicate ratings of the same transaction type
Again I'm just taking a wild shot in the dark about your business
logic from that description. I don't mention "user" or "agent" in
mine. But we're already describing Agent, and can anything but a
User rate an agent? If only a User can, do you even need to specify
that it's a User who is doing the rating?
I do find exercises like this where you have to try and describe your
problem domain succinctly helps to understand it, and to be able to
talk to another developer or your customer intelligently about it.
On Jul 5, 2007, at 3:06 PM, s.ross wrote:
> On Jul 5, 2007, at 12:52 PM, David Chelimsky wrote:
>>> Agent "should not allow the same user to rate the same agent twice
>>> with the same kind of transaction"
>> How would you phrase all this with context/specify? Or, a bit further
>> off target, TestCase/test_method?
> I wouldn't phrase it differently with context/specify and with
> TestCase/test_method, I'd probably care less because I wouldn't have
> been trained to create beautiful, self-documenting example
> descriptions :)
> I'm just thinking there must be a nicer way to express what I mean.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users