Created
November 10, 2008 17:14
-
-
Save croaky/23544 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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