Sha256: f6f4405419bab2f06c1ef7d5ab2fb30f3d7cabea3cbcb41bdccb31b650eda23d

Contents?: true

Size: 515 Bytes

Versions: 5

Compression:

Stored size: 515 Bytes

Contents

require 'ronin/code/sql/create_index'

require 'code/sql/create_examples'

describe CreateIndex do
  before(:each) do
    @sql = CreateIndex.new(common_dialect)
  end

  it_should_behave_like "Create"

  it "should have an on clause" do
    @sql.on :users, [:name]

    should_have_clause(@sql,:on) do |on|
      on.table.should == :users
      on.fields.should == [:name]
    end
  end

  it "should have an index option" do
    @sql.index :users
    @sql.instance_variable_get('@name').should == :users
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ronin-sql-0.2.4 spec/code/sql/create_index_spec.rb
ronin-sql-0.2.3 spec/code/sql/create_index_spec.rb
ronin-sql-0.2.1 spec/code/sql/create_index_spec.rb
ronin-sql-0.2.0 spec/code/sql/create_index_spec.rb
ronin-sql-0.2.2 spec/code/sql/create_index_spec.rb