You can usually just use the eq matched to compare two numbers: expect(deal.total).to eq(120)
Dump this method into your Ruby console to quickly print data in columns. This is helpful for e.g. comparing attributes...
There seems to be no built-in matcher in RSpec to check if a string contains terms in the desired...
When using send_file (for example for attachments of any kind), make sure your application knows the correct mime types...
If you want to inspect the compiled code of your erb (or haml) templates, you can run the following code...
Ever wondered if there is a reverse for Rails' .each(&:to_s) idiom? Turns out there is... You probably already...
I wonder if the guy that wrote BigDecimal#inspect has a tragic backstory that explains why he hates humanity.
This will give you the string that appears most often in an array: names = %w[ foo foo bar bar bar...