Sha256: 99d404db9c4301c3f917b91df891f0668a791092161e5f441813b2847cbe26bc
Contents?: true
Size: 651 Bytes
Versions: 4
Compression:
Stored size: 651 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe "Group Helper" do before(:each) do clean_database! end describe "grouped_column_names_for method" do before(:each) do @taggable = TaggableModel.new(:name => "Bob Jones") end it "should return all column names joined for Tag GROUP clause" do @taggable.grouped_column_names_for(Tag).should == "tags.id, tags.name" end it "should return all column names joined for TaggableModel GROUP clause" do @taggable.grouped_column_names_for(TaggableModel).should == "taggable_models.id, taggable_models.name, taggable_models.type" end end end
Version data entries
4 entries across 4 versions & 3 rubygems