Top "Shoulda" questions

Shoulda, developed by thoughtbot, provides constructs for organizing Test::Unit tests and matchers for testing Ruby on Rails applications that work with Test::Unit or RSpec.

How to test scopes?

tried to find but with no success. Just wondering how could I test scopes in Rails 3. Could be using rspec, …

ruby-on-rails unit-testing ruby-on-rails-3 rspec2 shoulda
how to test rspec shoulda for custom validation in rails?

I have a Private methods in my model like the following: validate :record_uniq private def record_uniq if record_…

ruby-on-rails ruby-on-rails-3 rspec rspec-rails shoulda
Shoulda belongs_to with class_name and foreign_key

I know you can easily test a belongs to relationship using Shoulda: describe Dog dog it { should belong_to(:owner) } …

ruby-on-rails rspec shoulda