Sha256: ab93ed2ba7bc33b963de301b6c0ac2d12d7a9602f7df1880dad220108ccec285

Contents?: true

Size: 454 Bytes

Versions: 54

Compression:

Stored size: 454 Bytes

Contents

require "spec_helper"

describe "Simple::SQL.locked" do
  xit 'acquires and releases an advisory lock' do # pending: "This code was manually tested"
    one = Simple::SQL.locked(4711) do
      Simple::SQL.ask "SELECT 1"
    end

    expect(one).to eq(1)
  end

  xit 'releases the lock after an exception' do # pending: "This code was manually tested"
    begin
      Simple::SQL.locked(4711) do
        raise "HU"
      end
    rescue
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
simple-sql-0.5.37 spec/simple/sql_locked_spec.rb
simple-sql-0.5.36 spec/simple/sql_locked_spec.rb
simple-sql-0.5.35 spec/simple/sql_locked_spec.rb
simple-sql-0.5.34 spec/simple/sql_locked_spec.rb
simple-sql-0.5.33 spec/simple/sql_locked_spec.rb
simple-sql-0.5.32 spec/simple/sql_locked_spec.rb
simple-sql-0.5.31 spec/simple/sql_locked_spec.rb
simple-sql-0.5.30 spec/simple/sql_locked_spec.rb
simple-sql-0.5.29 spec/simple/sql_locked_spec.rb
simple-sql-0.5.28 spec/simple/sql_locked_spec.rb
simple-sql-0.5.27 spec/simple/sql_locked_spec.rb
simple-sql-0.5.26 spec/simple/sql_locked_spec.rb
simple-sql-0.5.25 spec/simple/sql_locked_spec.rb
simple-sql-0.5.24 spec/simple/sql_locked_spec.rb
simple-sql-0.5.23 spec/simple/sql_locked_spec.rb
simple-sql-0.5.22 spec/simple/sql_locked_spec.rb
simple-sql-0.5.21 spec/simple/sql_locked_spec.rb
simple-sql-0.5.20 spec/simple/sql_locked_spec.rb
simple-sql-0.5.19 spec/simple/sql_locked_spec.rb
simple-sql-0.5.18 spec/simple/sql_locked_spec.rb