Sha256: 0a9ac0e4c43e3894d03131c29bec55fe3ff2229a53fa5a0b6e5673605927a519

Contents?: true

Size: 542 Bytes

Versions: 5

Compression:

Stored size: 542 Bytes

Contents

require 'ronin/code/sql/update'

require 'helpers/code'
require 'code/sql/has_where_clause_examples'

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

  it_should_behave_like "has a where clause"

  it "should have a set clause" do
    values = [1, 'bob', 25]
    @sql.set(*values)

    should_have_clause(@sql,:set) do |clause|
      clause.values.should == values
    end
  end

  it "should have a table option" do
    @sql.table :users
    @sql.instance_variable_get('@table').should == :users
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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