Sha256: c45f518ffa04c9b12eb5ea545802ba3e8701a96e32fb73dd4d732f034f757251

Contents?: true

Size: 500 Bytes

Versions: 1

Compression:

Stored size: 500 Bytes

Contents

require File.expand_path('../test_helper.rb', File.dirname(__FILE__))

describe Tracker::SparqlCursor do
  describe '#get_string' do
    before do
      conn = Tracker::SparqlConnection.get
      @cursor = conn.query "SELECT 'Foo' { }", nil

      @cursor.next nil
    end

    it 'returns just the string value' do
      @cursor.get_string(0).must_equal 'Foo'
    end

    it 'can safely be called twice' do
      @cursor.get_string(0)
      @cursor.get_string(0).must_equal 'Foo'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gir_ffi-tracker-0.14.0 test/unit/tracker_sparql_cursor_test.rb