Sugary new rspec syntax
A new version of rspec was just released and I love this bit of syntactic sugar (taken right out of the blog post):
describe Person do describe "born 19 years ago" do subject { Person.new(:birthdate => 19.years.ago } it { should be_eligible_to_vote } it { should be_eligible_to_enlist } it { should_not be_eligible_to_drink } end end
The best part is that its a serious improvement to a very common use-case. Kudos for the positive changes. This is great.





