Sha256: 3d9ed916b0c1b5398227eccb4e14d2ff46f0a5223c6e29ea847d47919c8a1165

Contents?: true

Size: 790 Bytes

Versions: 9

Compression:

Stored size: 790 Bytes

Contents

require "spec_helper"

describe Fancygrid::Column do
  
  class DummyClass
    def self.table_name; "dummy_table"; end;
  end
  
  before :each do
    @node = Fancygrid::Node.new(nil, :project, {})
  end
  
  it "#identifier should combine table_name and column name" do
    @node.column :description
    @node.children.last.identifier.should == "projects.description"
  end
  
  it "#select_name should combine table_name and column name" do
    @node.column :description
    @node.children.last.identifier.should == "projects.description"
  end
  
  it "#tag_class should contain table_name and name" do
    @node.column :description
    @node.children.last.tag_class.include?("projects").should be true
    @node.children.last.tag_class.include?("description").should be true
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fancygrid-2.0.8 spec/column_spec.rb
fancygrid-2.0.7 spec/column_spec.rb
fancygrid-2.0.6 spec/column_spec.rb
fancygrid-2.0.5 spec/column_spec.rb
fancygrid-2.0.4 spec/column_spec.rb
fancygrid-2.0.3 spec/column_spec.rb
fancygrid-2.0.2 spec/column_spec.rb
fancygrid-2.0.1 spec/column_spec.rb
fancygrid-2.0.0 spec/column_spec.rb