diff --git a/spec/cocoon_spec.rb b/spec/cocoon_spec.rb index 069f4e8..818bc79 100644 --- a/spec/cocoon_spec.rb +++ b/spec/cocoon_spec.rb @@ -54,6 +54,13 @@ describe Cocoon do end end + context "when using aliased association and class-name" do + it "uses the correct name" do + result = @tester.link_to_add_association('add something', @form_obj, :admin_comments) + result.to_s.should == 'add something' + end + end + it "tttt" do @post.class.reflect_on_association(:people).klass.new.should be_a(Person) end