Created
August 28, 2008 17:28
-
-
Save seebq/7778 to your computer and use it in GitHub Desktop.
This file contains 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
require 'test_helper' | |
class FishTest < ActiveSupport::TestCase | |
# Replace this with your real tests. | |
def test_fish_belongs_to_pond | |
pond = Pond.create! | |
fish = pond.fishes.create!() | |
assert pond.fishes.member?(fish) # works | |
fish = Fish.create(:pond => pond) | |
assert pond.fishes.reload.member?(fish) # Does not work | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment