Skip to content

Instantly share code, notes, and snippets.

View BDanyil's full-sized avatar
👋

Danyil Baltaksa BDanyil

👋
View GitHub Profile
@luisalima
luisalima / shoulda_cheat_model.rb
Created December 19, 2012 19:02
Shoulda model testing cheat sheet
# updated from the original @ http://cheat.errtheblog.com/s/rspec_shoulda
# just a subset -- models -- is included here. I'll update this, and create cheat sheets for others, as I go along.
# I marked the ones I added with NEW and also added the links to the corresponding code, as I think it's useful.
# Any comments/corrections are welcome!
# ================= Data and Associations =======================
# https://github.com/thoughtbot/shoulda-matchers/tree/master/lib/shoulda/matchers/active_record
it { should_not have_db_column(:admin).of_type(:boolean) }