Skip to content
Newer
Older
100644 20 lines (13 sloc) 485 Bytes
e72497c @jnunemaker Use shared setup for examples.
authored
1 require_relative 'shared_setup'
ef435f5 @jnunemaker Initial commit of working version.
authored
2
e72497c @jnunemaker Use shared setup for examples.
authored
3 client = AppsCF
ef435f5 @jnunemaker Initial commit of working version.
authored
4 adapter = Adapter[:cassanity].new(client)
5 adapter.clear
6
7 id = CassandraCQL::UUID.new
8
9 adapter.write(id, name: 'GitHub')
10 puts 'Should be {id: ..., name: "GitHub"}: ' + adapter.read(id).inspect
11
12 adapter.delete(id)
13 puts 'Should be nil: ' + adapter.read(id).inspect
14
15 adapter.write(id, name: 'GitHub')
16 adapter.clear
17 puts 'Should be nil: ' + adapter.read(id).inspect
18
19 puts 'Should be {foo: "bar"}: ' + adapter.fetch(id, {foo: 'bar'}).inspect
Something went wrong with that request. Please try again.