News for hackers. Stuff that matters.
Re:RSpec Best Practices by jibbist on Wednesday October 03, 2012 @09:55AM (#4607375)
As an experience Ruby dev, these are pretty much all standard practices in real projects. I don't like shared examples, wince at the thought of that much complexity being hidden away in a test!
Re:RSpec Best Practices by tspike on Wednesday October 03, 2012 @11:33AM (#4607910)
Could you elaborate on what you mean by "shared examples"?
Re:RSpec Best Practices by davidcuddeback on Wednesday October 03, 2012 @11:43AM (#4607970)
He's referring to this: https://www.relishapp.com/rspec/rspec-core/v/2-0/docs/exampl...

I keep shared examples to a minimum, but I do find them useful in some cases, such as when I have to test the same few attributes over and over in different contexts. But I define the shared example in the same file that uses them, and never have project-wide shared example groups.