Achieving better structure for rspec feature specs through "by" and "and_by" blocks
If you find that you are making your rspec feature specs longer and longer to cram more coverage in or to prevent the setup costs for more, shorter tests, you will probably have found that it becomes very hard to figure out what's going on. If you find yourself wanting to add comments to your specs to state what is happening, consider instead introducing blocks to structure you test:
Written by Stephan Hagemann
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#