Mystified by RSpec's DSL? Some parentheses can add clarity
25-Jul-2019 1672
Many developers have a hard time wrapping their head around RSpec’s DSL syntax. To me for a long time, RSpec’s syntax was a mystery.Then one day I realized that RSpec’s syntax is just methods and blocks. There’s not some crazy ass metaprogramming going on that’s beyond my abilities to comprehend. Everything in RSpec I’ve ever used can be (as far as I can tell) boiled down to methods and blocks.I’ll give a concrete example to aid understanding.Below is an RSpec test I pulled from a project of mine, Mississippi.com, which I’ve live-coded in my Sausage Factory videos.
Mystified by RSpec's DSL? Some parentheses can add clarity #ruby #rubydeveloper #rubyonrails #Mystified #RSpec's #parentheses #clarity #rspec's https://rubyonrails.ba/link/mystified-by-rspec-s-dsl-some-parentheses-can-add-clarity