juno 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. data/Gemfile +3 -2
  2. data/README.md +6 -1
  3. data/lib/juno.rb +20 -28
  4. data/lib/juno/adapters/activerecord.rb +24 -17
  5. data/lib/juno/adapters/couch.rb +6 -1
  6. data/lib/juno/adapters/datamapper.rb +7 -5
  7. data/lib/juno/adapters/sequel.rb +14 -7
  8. data/lib/juno/adapters/sqlite.rb +4 -4
  9. data/lib/juno/transformer.rb +14 -19
  10. data/lib/juno/version.rb +1 -1
  11. data/spec/adapter_activerecord_spec.rb +4 -4
  12. data/spec/adapter_datamapper_spec.rb +6 -6
  13. data/spec/adapter_sequel_spec.rb +2 -2
  14. data/spec/adapter_sqlite_spec.rb +2 -2
  15. data/spec/generate.rb +123 -18
  16. data/spec/junospecs.rb +63 -0
  17. data/spec/simpl_memory_with_expires_spec.rb +53 -0
  18. data/spec/simple_activerecord_spec.rb +2 -2
  19. data/spec/simple_activerecord_with_expires_spec.rb +53 -0
  20. data/spec/simple_couch_with_expires_spec.rb +53 -0
  21. data/spec/simple_datamapper_spec.rb +2 -2
  22. data/spec/simple_datamapper_with_expires_spec.rb +55 -0
  23. data/spec/simple_datamapper_with_repository_spec.rb +2 -2
  24. data/spec/simple_dbm_with_expires_spec.rb +53 -0
  25. data/spec/simple_file_with_expires_spec.rb +53 -0
  26. data/spec/simple_fog_with_expires_spec.rb +63 -0
  27. data/spec/simple_gdbm_with_expires_spec.rb +53 -0
  28. data/spec/simple_hashfile_with_expires_spec.rb +53 -0
  29. data/spec/simple_localmemcache_with_expires_spec.rb +53 -0
  30. data/spec/simple_memory_with_expires_spec.rb +53 -0
  31. data/spec/simple_mongo_with_expires_spec.rb +53 -0
  32. data/spec/simple_pstore_with_expires_spec.rb +53 -0
  33. data/spec/simple_riak_with_expires_spec.rb +57 -0
  34. data/spec/simple_sdbm_with_expires_spec.rb +53 -0
  35. data/spec/simple_sequel_spec.rb +2 -2
  36. data/spec/simple_sequel_with_expires_spec.rb +53 -0
  37. data/spec/simple_sqlite_spec.rb +2 -2
  38. data/spec/simple_sqlite_with_expires_spec.rb +53 -0
  39. data/spec/simple_tokyocabinet_with_expires_spec.rb +53 -0
  40. data/spec/simple_yaml_with_expires_spec.rb +53 -0
  41. metadata +40 -2
@@ -2,11 +2,11 @@
2
2
  require 'helper'
3
3
 
4
4
  begin
5
- Juno.new(:ActiveRecord, :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3'), :database => File.join(make_tempdir, 'simple_activerecord.sqlite3') }).close
5
+ Juno.new(:ActiveRecord, :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3'), :database => File.join(make_tempdir, 'simple_activerecord') }).close
6
6
 
7
7
  describe "simple_activerecord" do
8
8
  before do
9
- @store = Juno.new(:ActiveRecord, :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3'), :database => File.join(make_tempdir, 'simple_activerecord.sqlite3') })
9
+ @store = Juno.new(:ActiveRecord, :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3'), :database => File.join(make_tempdir, 'simple_activerecord') })
10
10
  @store.clear
11
11
  end
12
12
 
@@ -0,0 +1,53 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+ Juno.new(:ActiveRecord, :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3'), :database => File.join(make_tempdir, 'simple_activerecord_with_expires') }, :expires => true).close
6
+
7
+ describe "simple_activerecord_with_expires" do
8
+ before do
9
+ @store = Juno.new(:ActiveRecord, :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3'), :database => File.join(make_tempdir, 'simple_activerecord_with_expires') }, :expires => true)
10
+ @store.clear
11
+ end
12
+
13
+ after do
14
+ @store.close.should == nil if @store
15
+ end
16
+
17
+ it_should_behave_like 'null_objectkey_objectvalue'
18
+ it_should_behave_like 'null_objectkey_stringvalue'
19
+ it_should_behave_like 'null_objectkey_hashvalue'
20
+ it_should_behave_like 'null_stringkey_objectvalue'
21
+ it_should_behave_like 'null_stringkey_stringvalue'
22
+ it_should_behave_like 'null_stringkey_hashvalue'
23
+ it_should_behave_like 'null_hashkey_objectvalue'
24
+ it_should_behave_like 'null_hashkey_stringvalue'
25
+ it_should_behave_like 'null_hashkey_hashvalue'
26
+ it_should_behave_like 'store_objectkey_objectvalue'
27
+ it_should_behave_like 'store_objectkey_stringvalue'
28
+ it_should_behave_like 'store_objectkey_hashvalue'
29
+ it_should_behave_like 'store_stringkey_objectvalue'
30
+ it_should_behave_like 'store_stringkey_stringvalue'
31
+ it_should_behave_like 'store_stringkey_hashvalue'
32
+ it_should_behave_like 'store_hashkey_objectvalue'
33
+ it_should_behave_like 'store_hashkey_stringvalue'
34
+ it_should_behave_like 'store_hashkey_hashvalue'
35
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
36
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
37
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
38
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
39
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
40
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
41
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
42
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
43
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
44
+ it_should_behave_like 'marshallable_key'
45
+ it_should_behave_like 'expires_stringkey_stringvalue'
46
+
47
+ end
48
+ rescue LoadError => ex
49
+ puts "Test simple_activerecord_with_expires not executed: #{ex.message}"
50
+ rescue Exception => ex
51
+ puts "Test simple_activerecord_with_expires not executed: #{ex.message}"
52
+ #puts "#{ex.backtrace.join("\n")}"
53
+ end
@@ -0,0 +1,53 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+ Juno.new(:Couch, :db => 'simple_couch_with_expires', :expires => true).close
6
+
7
+ describe "simple_couch_with_expires" do
8
+ before do
9
+ @store = Juno.new(:Couch, :db => 'simple_couch_with_expires', :expires => true)
10
+ @store.clear
11
+ end
12
+
13
+ after do
14
+ @store.close.should == nil if @store
15
+ end
16
+
17
+ it_should_behave_like 'null_objectkey_objectvalue'
18
+ it_should_behave_like 'null_objectkey_stringvalue'
19
+ it_should_behave_like 'null_objectkey_hashvalue'
20
+ it_should_behave_like 'null_stringkey_objectvalue'
21
+ it_should_behave_like 'null_stringkey_stringvalue'
22
+ it_should_behave_like 'null_stringkey_hashvalue'
23
+ it_should_behave_like 'null_hashkey_objectvalue'
24
+ it_should_behave_like 'null_hashkey_stringvalue'
25
+ it_should_behave_like 'null_hashkey_hashvalue'
26
+ it_should_behave_like 'store_objectkey_objectvalue'
27
+ it_should_behave_like 'store_objectkey_stringvalue'
28
+ it_should_behave_like 'store_objectkey_hashvalue'
29
+ it_should_behave_like 'store_stringkey_objectvalue'
30
+ it_should_behave_like 'store_stringkey_stringvalue'
31
+ it_should_behave_like 'store_stringkey_hashvalue'
32
+ it_should_behave_like 'store_hashkey_objectvalue'
33
+ it_should_behave_like 'store_hashkey_stringvalue'
34
+ it_should_behave_like 'store_hashkey_hashvalue'
35
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
36
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
37
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
38
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
39
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
40
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
41
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
42
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
43
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
44
+ it_should_behave_like 'marshallable_key'
45
+ it_should_behave_like 'expires_stringkey_stringvalue'
46
+
47
+ end
48
+ rescue LoadError => ex
49
+ puts "Test simple_couch_with_expires not executed: #{ex.message}"
50
+ rescue Exception => ex
51
+ puts "Test simple_couch_with_expires not executed: #{ex.message}"
52
+ #puts "#{ex.backtrace.join("\n")}"
53
+ end
@@ -4,11 +4,11 @@ require 'helper'
4
4
  begin
5
5
  require 'dm-core'
6
6
  DataMapper.setup(:default, :adapter => :in_memory)
7
- Juno.new(:DataMapper, :setup => "sqlite3://#{make_tempdir}/simple_datamapper-default.sqlite3").close
7
+ Juno.new(:DataMapper, :setup => "sqlite3://#{make_tempdir}/simple_datamapper").close
8
8
 
9
9
  describe "simple_datamapper" do
10
10
  before do
11
- @store = Juno.new(:DataMapper, :setup => "sqlite3://#{make_tempdir}/simple_datamapper-default.sqlite3")
11
+ @store = Juno.new(:DataMapper, :setup => "sqlite3://#{make_tempdir}/simple_datamapper")
12
12
  @store.clear
13
13
  end
14
14
 
@@ -0,0 +1,55 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+ require 'dm-core'
6
+ DataMapper.setup(:default, :adapter => :in_memory)
7
+ Juno.new(:DataMapper, :setup => "sqlite3://#{make_tempdir}/simple_datamapper_with_expires", :expires => true).close
8
+
9
+ describe "simple_datamapper_with_expires" do
10
+ before do
11
+ @store = Juno.new(:DataMapper, :setup => "sqlite3://#{make_tempdir}/simple_datamapper_with_expires", :expires => true)
12
+ @store.clear
13
+ end
14
+
15
+ after do
16
+ @store.close.should == nil if @store
17
+ end
18
+
19
+ it_should_behave_like 'null_objectkey_objectvalue'
20
+ it_should_behave_like 'null_objectkey_stringvalue'
21
+ it_should_behave_like 'null_objectkey_hashvalue'
22
+ it_should_behave_like 'null_stringkey_objectvalue'
23
+ it_should_behave_like 'null_stringkey_stringvalue'
24
+ it_should_behave_like 'null_stringkey_hashvalue'
25
+ it_should_behave_like 'null_hashkey_objectvalue'
26
+ it_should_behave_like 'null_hashkey_stringvalue'
27
+ it_should_behave_like 'null_hashkey_hashvalue'
28
+ it_should_behave_like 'store_objectkey_objectvalue'
29
+ it_should_behave_like 'store_objectkey_stringvalue'
30
+ it_should_behave_like 'store_objectkey_hashvalue'
31
+ it_should_behave_like 'store_stringkey_objectvalue'
32
+ it_should_behave_like 'store_stringkey_stringvalue'
33
+ it_should_behave_like 'store_stringkey_hashvalue'
34
+ it_should_behave_like 'store_hashkey_objectvalue'
35
+ it_should_behave_like 'store_hashkey_stringvalue'
36
+ it_should_behave_like 'store_hashkey_hashvalue'
37
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
38
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
39
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
40
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
41
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
42
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
43
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
44
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
45
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
46
+ it_should_behave_like 'marshallable_key'
47
+ it_should_behave_like 'expires_stringkey_stringvalue'
48
+
49
+ end
50
+ rescue LoadError => ex
51
+ puts "Test simple_datamapper_with_expires not executed: #{ex.message}"
52
+ rescue Exception => ex
53
+ puts "Test simple_datamapper_with_expires not executed: #{ex.message}"
54
+ #puts "#{ex.backtrace.join("\n")}"
55
+ end
@@ -4,11 +4,11 @@ require 'helper'
4
4
  begin
5
5
  require 'dm-core'
6
6
  DataMapper.setup(:default, :adapter => :in_memory)
7
- Juno.new(:DataMapper, :repository => :repo, :setup => "sqlite3://#{make_tempdir}/simple_datamapper-repo.sqlite3").close
7
+ Juno.new(:DataMapper, :repository => :repo, :setup => "sqlite3://#{make_tempdir}/simple_datamapper_with_repository").close
8
8
 
9
9
  describe "simple_datamapper_with_repository" do
10
10
  before do
11
- @store = Juno.new(:DataMapper, :repository => :repo, :setup => "sqlite3://#{make_tempdir}/simple_datamapper-repo.sqlite3")
11
+ @store = Juno.new(:DataMapper, :repository => :repo, :setup => "sqlite3://#{make_tempdir}/simple_datamapper_with_repository")
12
12
  @store.clear
13
13
  end
14
14
 
@@ -0,0 +1,53 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+ Juno.new(:DBM, :file => File.join(make_tempdir, "simple_dbm_with_expires"), :expires => true).close
6
+
7
+ describe "simple_dbm_with_expires" do
8
+ before do
9
+ @store = Juno.new(:DBM, :file => File.join(make_tempdir, "simple_dbm_with_expires"), :expires => true)
10
+ @store.clear
11
+ end
12
+
13
+ after do
14
+ @store.close.should == nil if @store
15
+ end
16
+
17
+ it_should_behave_like 'null_objectkey_objectvalue'
18
+ it_should_behave_like 'null_objectkey_stringvalue'
19
+ it_should_behave_like 'null_objectkey_hashvalue'
20
+ it_should_behave_like 'null_stringkey_objectvalue'
21
+ it_should_behave_like 'null_stringkey_stringvalue'
22
+ it_should_behave_like 'null_stringkey_hashvalue'
23
+ it_should_behave_like 'null_hashkey_objectvalue'
24
+ it_should_behave_like 'null_hashkey_stringvalue'
25
+ it_should_behave_like 'null_hashkey_hashvalue'
26
+ it_should_behave_like 'store_objectkey_objectvalue'
27
+ it_should_behave_like 'store_objectkey_stringvalue'
28
+ it_should_behave_like 'store_objectkey_hashvalue'
29
+ it_should_behave_like 'store_stringkey_objectvalue'
30
+ it_should_behave_like 'store_stringkey_stringvalue'
31
+ it_should_behave_like 'store_stringkey_hashvalue'
32
+ it_should_behave_like 'store_hashkey_objectvalue'
33
+ it_should_behave_like 'store_hashkey_stringvalue'
34
+ it_should_behave_like 'store_hashkey_hashvalue'
35
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
36
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
37
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
38
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
39
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
40
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
41
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
42
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
43
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
44
+ it_should_behave_like 'marshallable_key'
45
+ it_should_behave_like 'expires_stringkey_stringvalue'
46
+
47
+ end
48
+ rescue LoadError => ex
49
+ puts "Test simple_dbm_with_expires not executed: #{ex.message}"
50
+ rescue Exception => ex
51
+ puts "Test simple_dbm_with_expires not executed: #{ex.message}"
52
+ #puts "#{ex.backtrace.join("\n")}"
53
+ end
@@ -0,0 +1,53 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+ Juno.new(:File, :dir => File.join(make_tempdir, "simple_file_with_expires"), :expires => true).close
6
+
7
+ describe "simple_file_with_expires" do
8
+ before do
9
+ @store = Juno.new(:File, :dir => File.join(make_tempdir, "simple_file_with_expires"), :expires => true)
10
+ @store.clear
11
+ end
12
+
13
+ after do
14
+ @store.close.should == nil if @store
15
+ end
16
+
17
+ it_should_behave_like 'null_objectkey_objectvalue'
18
+ it_should_behave_like 'null_objectkey_stringvalue'
19
+ it_should_behave_like 'null_objectkey_hashvalue'
20
+ it_should_behave_like 'null_stringkey_objectvalue'
21
+ it_should_behave_like 'null_stringkey_stringvalue'
22
+ it_should_behave_like 'null_stringkey_hashvalue'
23
+ it_should_behave_like 'null_hashkey_objectvalue'
24
+ it_should_behave_like 'null_hashkey_stringvalue'
25
+ it_should_behave_like 'null_hashkey_hashvalue'
26
+ it_should_behave_like 'store_objectkey_objectvalue'
27
+ it_should_behave_like 'store_objectkey_stringvalue'
28
+ it_should_behave_like 'store_objectkey_hashvalue'
29
+ it_should_behave_like 'store_stringkey_objectvalue'
30
+ it_should_behave_like 'store_stringkey_stringvalue'
31
+ it_should_behave_like 'store_stringkey_hashvalue'
32
+ it_should_behave_like 'store_hashkey_objectvalue'
33
+ it_should_behave_like 'store_hashkey_stringvalue'
34
+ it_should_behave_like 'store_hashkey_hashvalue'
35
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
36
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
37
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
38
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
39
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
40
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
41
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
42
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
43
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
44
+ it_should_behave_like 'marshallable_key'
45
+ it_should_behave_like 'expires_stringkey_stringvalue'
46
+
47
+ end
48
+ rescue LoadError => ex
49
+ puts "Test simple_file_with_expires not executed: #{ex.message}"
50
+ rescue Exception => ex
51
+ puts "Test simple_file_with_expires not executed: #{ex.message}"
52
+ #puts "#{ex.backtrace.join("\n")}"
53
+ end
@@ -0,0 +1,63 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+ require 'fog'
6
+ Fog.mock!
7
+ Juno.new(:Fog, :aws_access_key_id => 'fake_access_key_id',
8
+ :aws_secret_access_key => 'fake_secret_access_key',
9
+ :provider => 'AWS',
10
+ :dir => 'juno',
11
+ :expires => true).close
12
+
13
+ describe "simple_fog_with_expires" do
14
+ before do
15
+ @store = Juno.new(:Fog, :aws_access_key_id => 'fake_access_key_id',
16
+ :aws_secret_access_key => 'fake_secret_access_key',
17
+ :provider => 'AWS',
18
+ :dir => 'juno',
19
+ :expires => true)
20
+ @store.clear
21
+ end
22
+
23
+ after do
24
+ @store.close.should == nil if @store
25
+ end
26
+
27
+ it_should_behave_like 'null_objectkey_objectvalue'
28
+ it_should_behave_like 'null_objectkey_stringvalue'
29
+ it_should_behave_like 'null_objectkey_hashvalue'
30
+ it_should_behave_like 'null_stringkey_objectvalue'
31
+ it_should_behave_like 'null_stringkey_stringvalue'
32
+ it_should_behave_like 'null_stringkey_hashvalue'
33
+ it_should_behave_like 'null_hashkey_objectvalue'
34
+ it_should_behave_like 'null_hashkey_stringvalue'
35
+ it_should_behave_like 'null_hashkey_hashvalue'
36
+ it_should_behave_like 'store_objectkey_objectvalue'
37
+ it_should_behave_like 'store_objectkey_stringvalue'
38
+ it_should_behave_like 'store_objectkey_hashvalue'
39
+ it_should_behave_like 'store_stringkey_objectvalue'
40
+ it_should_behave_like 'store_stringkey_stringvalue'
41
+ it_should_behave_like 'store_stringkey_hashvalue'
42
+ it_should_behave_like 'store_hashkey_objectvalue'
43
+ it_should_behave_like 'store_hashkey_stringvalue'
44
+ it_should_behave_like 'store_hashkey_hashvalue'
45
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
46
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
47
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
48
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
49
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
50
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
51
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
52
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
53
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
54
+ it_should_behave_like 'marshallable_key'
55
+ it_should_behave_like 'expires_stringkey_stringvalue'
56
+
57
+ end
58
+ rescue LoadError => ex
59
+ puts "Test simple_fog_with_expires not executed: #{ex.message}"
60
+ rescue Exception => ex
61
+ puts "Test simple_fog_with_expires not executed: #{ex.message}"
62
+ #puts "#{ex.backtrace.join("\n")}"
63
+ end
@@ -0,0 +1,53 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+ Juno.new(:GDBM, :file => File.join(make_tempdir, "simple_gdbm_with_expires"), :expires => true).close
6
+
7
+ describe "simple_gdbm_with_expires" do
8
+ before do
9
+ @store = Juno.new(:GDBM, :file => File.join(make_tempdir, "simple_gdbm_with_expires"), :expires => true)
10
+ @store.clear
11
+ end
12
+
13
+ after do
14
+ @store.close.should == nil if @store
15
+ end
16
+
17
+ it_should_behave_like 'null_objectkey_objectvalue'
18
+ it_should_behave_like 'null_objectkey_stringvalue'
19
+ it_should_behave_like 'null_objectkey_hashvalue'
20
+ it_should_behave_like 'null_stringkey_objectvalue'
21
+ it_should_behave_like 'null_stringkey_stringvalue'
22
+ it_should_behave_like 'null_stringkey_hashvalue'
23
+ it_should_behave_like 'null_hashkey_objectvalue'
24
+ it_should_behave_like 'null_hashkey_stringvalue'
25
+ it_should_behave_like 'null_hashkey_hashvalue'
26
+ it_should_behave_like 'store_objectkey_objectvalue'
27
+ it_should_behave_like 'store_objectkey_stringvalue'
28
+ it_should_behave_like 'store_objectkey_hashvalue'
29
+ it_should_behave_like 'store_stringkey_objectvalue'
30
+ it_should_behave_like 'store_stringkey_stringvalue'
31
+ it_should_behave_like 'store_stringkey_hashvalue'
32
+ it_should_behave_like 'store_hashkey_objectvalue'
33
+ it_should_behave_like 'store_hashkey_stringvalue'
34
+ it_should_behave_like 'store_hashkey_hashvalue'
35
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
36
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
37
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
38
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
39
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
40
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
41
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
42
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
43
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
44
+ it_should_behave_like 'marshallable_key'
45
+ it_should_behave_like 'expires_stringkey_stringvalue'
46
+
47
+ end
48
+ rescue LoadError => ex
49
+ puts "Test simple_gdbm_with_expires not executed: #{ex.message}"
50
+ rescue Exception => ex
51
+ puts "Test simple_gdbm_with_expires not executed: #{ex.message}"
52
+ #puts "#{ex.backtrace.join("\n")}"
53
+ end
@@ -0,0 +1,53 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+ Juno.new(:HashFile, :dir => File.join(make_tempdir, "simple_hashfile_with_expires"), :expires => true).close
6
+
7
+ describe "simple_hashfile_with_expires" do
8
+ before do
9
+ @store = Juno.new(:HashFile, :dir => File.join(make_tempdir, "simple_hashfile_with_expires"), :expires => true)
10
+ @store.clear
11
+ end
12
+
13
+ after do
14
+ @store.close.should == nil if @store
15
+ end
16
+
17
+ it_should_behave_like 'null_objectkey_objectvalue'
18
+ it_should_behave_like 'null_objectkey_stringvalue'
19
+ it_should_behave_like 'null_objectkey_hashvalue'
20
+ it_should_behave_like 'null_stringkey_objectvalue'
21
+ it_should_behave_like 'null_stringkey_stringvalue'
22
+ it_should_behave_like 'null_stringkey_hashvalue'
23
+ it_should_behave_like 'null_hashkey_objectvalue'
24
+ it_should_behave_like 'null_hashkey_stringvalue'
25
+ it_should_behave_like 'null_hashkey_hashvalue'
26
+ it_should_behave_like 'store_objectkey_objectvalue'
27
+ it_should_behave_like 'store_objectkey_stringvalue'
28
+ it_should_behave_like 'store_objectkey_hashvalue'
29
+ it_should_behave_like 'store_stringkey_objectvalue'
30
+ it_should_behave_like 'store_stringkey_stringvalue'
31
+ it_should_behave_like 'store_stringkey_hashvalue'
32
+ it_should_behave_like 'store_hashkey_objectvalue'
33
+ it_should_behave_like 'store_hashkey_stringvalue'
34
+ it_should_behave_like 'store_hashkey_hashvalue'
35
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
36
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
37
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
38
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
39
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
40
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
41
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
42
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
43
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
44
+ it_should_behave_like 'marshallable_key'
45
+ it_should_behave_like 'expires_stringkey_stringvalue'
46
+
47
+ end
48
+ rescue LoadError => ex
49
+ puts "Test simple_hashfile_with_expires not executed: #{ex.message}"
50
+ rescue Exception => ex
51
+ puts "Test simple_hashfile_with_expires not executed: #{ex.message}"
52
+ #puts "#{ex.backtrace.join("\n")}"
53
+ end