Ruby on Rails Friday, July 19, 2013

J. mp wrote in post #1115983:
> I want to run both test for each of the role (Merchant or FrontStore)
> but
> not repeating the test code.
>
> My question is, how best design the test so they are reusable in this
> case?

IMHO you shouldn't. Test code should be DAMP not DRY:

http://stackoverflow.com/questions/6453235/what-does-damp-not-dry-mean-when-talking-about-unit-tests?lq=1

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4d6bca5b37a437db8b636a2fff94fc5b%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment