Skip to content

Commit

Permalink
add failing spec against activerecord 3.2.1.
Browse files Browse the repository at this point in the history
- this spec will sucess against ar 3.1.3.
- the related commit on ar is: rails/rails@50d395f
  • Loading branch information
kakutani committed Jan 30, 2012
1 parent cb915e2 commit d885ac0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/active_record/associations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,15 @@ def company_name; 'Company A'; end
emp = Employee.find(e.id)
emp.company.status.should == :c_corp
end

it "should create successfully via hash on instantiation" do
Company.delete_all
Employee.delete_all
c = Company.create!(:name=>company_name, :status=>:c_corp)
e = Employee.create!(:name=>'juanita', :status=>:part_time, :company => c)
e.save!

emp = Employee.find(e.id)
emp.company.should == c
end
end

0 comments on commit d885ac0

Please sign in to comment.