Skip to content

Instantly share code, notes, and snippets.

@croaky
Created November 10, 2008 17:14
Show Gist options
  • Save croaky/23544 to your computer and use it in GitHub Desktop.
Save croaky/23544 to your computer and use it in GitHub Desktop.
# Making RSpec concise:
# http://opensoul.org/2008/11/10/making-rspec-concise
describe Company do
it { should have_many(:classifications) }
it { should have_many(:events) }
it { should have_many(:interests) }
it { should have_many(:jobs) }
it { should have_many(:leads) }
it { should have_many(:locations) }
it { should have_many(:notes) }
it { should belong_to(:exchange) }
end
# Basic Test::Unit in Rails with custom assertions:
test "Company's associations" do
assert_has_many :classifications, :events, :interests, :jobs, :leads, :locations, :notes
assert_belong_to :exchange
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment