Created
August 2, 2008 14:39
-
-
Save dbussink/3738 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
diff --git a/spec/integration/association_spec.rb b/spec/integration/association_spec.rb | |
index 953338c..bbad032 100644 | |
--- a/spec/integration/association_spec.rb | |
+++ b/spec/integration/association_spec.rb | |
@@ -370,6 +370,13 @@ if ADAPTER | |
Machine.first(:name => 'machine10').should_not be_nil | |
end | |
+ it 'should set and retrieve associations on not yet saved objects' do | |
+ e = Machine.create(:name => 'machine10') | |
+ y = e.areas.build(:name => 'area10') | |
+ | |
+ y.machine.name.should == 'machine10' | |
+ end | |
+ | |
it 'should convert NULL parent ids into nils' do | |
Area.first(:name => 'area2').machine.should be_nil | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment