Sha256: 8becebbb75897caa01758594d2d9de3e218c8bcbb55be72e07d203d237922517

Contents?: true

Size: 571 Bytes

Versions: 2

Compression:

Stored size: 571 Bytes

Contents

require 'spec_helper'
module Alf
  module Relvar
    describe Base, "update" do

      let(:expr){ Algebra::Operand::Named.new(:suppliers, self) }
      let(:rv)  { Base.new(expr)                                }

      let(:updating)  { {sname: 'Jones'}      }
      let(:predicate) { Predicate.eq(:sid, 1) }

      def update(*args)
        @seen = args
      end

      subject{ rv.update(updating, predicate) }

      it 'delegates the call to the connection' do
        subject
        @seen.should eq([:suppliers, updating, predicate])
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-relvar/base/test_update.rb
alf-core-0.14.0 spec/unit/alf-relvar/base/test_update.rb