diff --git a/spec/squeel/adapters/active_record/relation_extensions_spec.rb b/spec/squeel/adapters/active_record/relation_extensions_spec.rb index 2754316..e5df0d2 100644 --- a/spec/squeel/adapters/active_record/relation_extensions_spec.rb +++ b/spec/squeel/adapters/active_record/relation_extensions_spec.rb @@ -800,6 +800,17 @@ module ActiveRecord end end + it 'creates new records with values from a polymorphic association' do + if activerecord_version_at_least '4.0.0' + article = Article.first + note = Note.where(notable: article).new + note.notable_id.should eq article.id + note.notable_type.should eq 'Article' + else + pending 'Not required pre-4.0' + end + end + end describe '#as' do