Sha256: 7729cb6493cf84f536e73d8d6be37d28aa09390f49569ae4137a09c9faa08901

Contents?: true

Size: 602 Bytes

Versions: 14

Compression:

Stored size: 602 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe "Group Helper" do

  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

14 entries across 14 versions & 1 rubygems

Version Path
acts-as-taggable-on-1.1.5 spec/acts_as_taggable_on/group_helper_spec.rb
acts-as-taggable-on-1.1.4 spec/acts_as_taggable_on/group_helper_spec.rb
acts-as-taggable-on-1.1.3 spec/acts_as_taggable_on/group_helper_spec.rb
acts-as-taggable-on-1.1.2 spec/acts_as_taggable_on/group_helper_spec.rb
acts-as-taggable-on-1.1.1 spec/acts_as_taggable_on/group_helper_spec.rb
acts-as-taggable-on-1.1.0 spec/acts_as_taggable_on/group_helper_spec.rb
acts-as-taggable-on-1.0.19 spec/acts_as_taggable_on/group_helper_spec.rb
acts-as-taggable-on-1.0.18 spec/acts_as_taggable_on/group_helper_spec.rb
acts-as-taggable-on-1.0.17 spec/acts_as_taggable_on/group_helper_spec.rb
acts-as-taggable-on-1.0.16 spec/acts_as_taggable_on/group_helper_spec.rb
acts-as-taggable-on-1.0.15 spec/acts_as_taggable_on/group_helper_spec.rb
acts-as-taggable-on-1.0.14 spec/acts_as_taggable_on/group_helper_spec.rb
acts-as-taggable-on-1.0.13 spec/acts_as_taggable_on/group_helper_spec.rb
acts-as-taggable-on-1.0.12 spec/acts_as_taggable_on/group_helper_spec.rb