Tricks with RSpec components outside RSpec
In this short post I’d like to show how some of RSpec components (matchers and expectations) can be used for a greater good outside your tests. Like in your normal everyday scripts.
Trying to be expressive, concise and readable, RSpec have developed a great number of idioms, mechanisms and approaches. They are reliable, most of Rubyists familiar with them, and code becames pretty expressive.
While I don’t recommend
trying this at home using the tricks shown below in your Big Enterprise Production core, you may like those things for short scripts, experiments, insights, and just for fun.
Tricks with RSpec components outside RSpec #ruby #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper