gibbler 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,153 +0,0 @@
1
-
2
- library :gibbler, 'lib'
3
- group "Gibbler Gazette"
4
-
5
- Gibbler.enable_debug if Tryouts.verbose > 3
6
-
7
- tryouts "Basic syntax with SHA1" do
8
-
9
- dream :exception, RuntimeError
10
- drill "include Gibbler raises exception" do
11
- a = Class.new
12
- a.send :include, Gibbler
13
- end
14
-
15
- dream :respond_to?, :gibbler
16
- dream :gibbler, '52be7494a602d85ff5d8a8ab4ffe7f1b171587df'
17
- drill "Symbol can gibbler", :kimmy
18
-
19
- dream :respond_to?, :gibbler
20
- dream :gibbler, 'c8027100ecc54945ab15ddac529230e38b1ba6a1'
21
- drill "String can gibbler" do
22
- "kimmy"
23
- end
24
-
25
- drill "String and Symbol return different digests", true do
26
- :kimmy.gibbler != "kimmy"
27
- end
28
-
29
- dream :respond_to?, :gibbler
30
- dream :gibbler, '25ac269ae3ef18cdb4143ad02ca315afb5026de9'
31
- drill "Class can gibbler", Class
32
-
33
- dream :respond_to?, :gibbler
34
- dream :gibbler, '4fdcadc66a38feb9c57faf3c5a18d5e76a6d29bf'
35
- drill "Empty Hash instance", Hash.new
36
-
37
- dream :gibbler, 'a9cad665549bd22a4346fcf602d9d3c3b0482bbe'
38
- drill "Fixnum instance" do
39
- 1
40
- end
41
-
42
- dream :gibbler, '608256db120251843843bba57e9b2c7adb7342aa'
43
- drill "Bignum instance" do
44
- 100000000000
45
- end
46
-
47
- dream :gibbler, "1d4b62e1e9f2c097b0cefb6877bf47c2015cdd21"
48
- drill "Populated Hash instance" do
49
- {
50
- :a => [1,2,3, [4,5,6]],
51
- :b => { :c => Class }
52
- }
53
- end
54
-
55
- dream :respond_to?, :gibbler
56
- dream :gibbler, '48fda57c05684c9e5c3259557851943572183a21'
57
- drill "Empty Array instance", Array.new
58
-
59
- dream :gibbler, "3e1d79d113a409a96a13ca3879fc4c42027aa74b"
60
- drill "Populated Array instance" do
61
- [1, 2, :runtime, [3, "four", [Object, true]]]
62
- end
63
-
64
- drill "Knows when a Hash has not changed", false do
65
- a = { :magic => true }
66
- a.gibbler
67
- a[:magic] = true
68
- a.gibbled?
69
- end
70
-
71
- drill "Knows when a Hash has changed", true do
72
- a = { :magic => true }
73
- a.gibbler
74
- a[:magic] = false
75
- a.gibbled?
76
- end
77
-
78
- dream ["667ce086", "92d5f7cd"]
79
- drill "Symbols digests don't cross streams" do
80
- a, b = :something, :anything
81
- a.gibbler
82
- b.gibbler
83
- [a.gibbler_cache.short, b.gibbler_cache.short]
84
- end
85
-
86
- dream ["ce0c7694", "c13b2f02"]
87
- drill "String digests don't cross streams" do
88
- a, b = 'something', 'anything'
89
- a.gibbler
90
- b.gibbler
91
- [a.gibbler_cache.short, b.gibbler_cache.short]
92
- end
93
-
94
- drill "Symbol has list of attic vars", [:gibbler_cache] do
95
- Symbol.attic_vars
96
- end
97
-
98
- drill "String has list of attic vars", [:gibbler_cache] do
99
- String.attic_vars
100
- end
101
-
102
- drill "Hash has list of attic vars", [:gibbler_cache] do
103
- Hash.attic_vars
104
- end
105
-
106
- drill "Freezing an object will update the digest", true do
107
- a = { :a => 1 }
108
- pre = a.gibbler;
109
- a[:a] = 2
110
- post = a.freeze.gibbler
111
- stash :pre, pre
112
- stash :post, post
113
- pre != post && post == a.gibbler_cache
114
- end
115
-
116
- dream :gibbler, "6ea546919dc4caa2bab69799b71d48810a1b48fa"
117
- drill "works on arbitrary objects" do
118
- class ::FullHouse
119
- include Gibbler::Complex
120
- attr_accessor :roles
121
- end
122
- a = FullHouse.new
123
- a.roles = [:jesse, :joey, :danny, :kimmy, :michelle, :dj, :stephanie]
124
- a
125
- end
126
-
127
- # TODO: Update for Attic 0.4
128
- drill "doesn't reveal @__gibbler_digest__ instance variable", false do
129
- a = {}
130
- a.gibbler # We need to gibbler first so it sets a value to the instance var
131
- val = Tryouts.sysinfo.ruby[1] == 9 ? :'@__gibbler_digest__' : '@__gibbler_digest__'
132
- stash :ivars, a.instance_variables
133
- stash :smeths, Gibbler.singleton_methods
134
- a.instance_variables.member? val
135
- end
136
-
137
- drill "previous digest", 'c8027100ecc54945ab15ddac529230e38b1ba6a1' do
138
- a = "kimmy"
139
- a.gibbler
140
- #stash :methods, a.methods.sort
141
- #
142
- #stash :string_methods, String.methods.sort
143
- #stash :gstring_methods, Gibbler::String.methods.sort
144
- #stash :class_methods, a.class.methods.sort
145
- stash :ivars, a.instance_variables
146
- a.gibbler_cache
147
- end
148
-
149
- end
150
-
151
-
152
-
153
-
@@ -1,40 +0,0 @@
1
-
2
- library :gibbler, File.dirname(__FILE__), '..', 'lib'
3
- group "Gibbler Gazette"
4
-
5
- Gibbler.enable_debug if Tryouts.verbose > 3
6
-
7
-
8
- tryouts "Basic syntax with SHA256" do
9
-
10
- setup do
11
- # NOTE: JRuby requires that we use OpenSSL::Digest::SHA256
12
- if Tryouts.sysinfo.vm == :java
13
- require 'openssl'
14
- Gibbler.digest_type = OpenSSL::Digest::SHA256
15
- else
16
- Gibbler.digest_type = Digest::SHA256
17
- end
18
-
19
- end
20
-
21
- clean do
22
- Gibbler.digest_type = Digest::SHA1
23
- end
24
-
25
- dream :gibbler, '754f87ca720ec256633a286d9270d68478850b2abd7b0ae65021cb769ae70c08'
26
- drill "A Symbol can gibbler", :anything
27
-
28
- dream :gibbler, 'd345c0afb4e8da0133a3946d3bd9b2622b0acdd8d6cc1237470cc637a9e4777f'
29
- drill "Class can gibbler", Class
30
-
31
- dream :gibbler, 'b7b874a9bff7825caa57750a900652354ac601b77497b694d313f658c69d25b4'
32
- drill "TrueClass can gibbler", TrueClass
33
-
34
- dream :gibbler, '88d2bcbd68ce593fd2e0e06f276f7301357516291b95c0c53038e61a9bf091e5'
35
- drill "Empty Hash instance", {}
36
-
37
- end
38
-
39
-
40
-
@@ -1,97 +0,0 @@
1
-
2
- library :gibbler, 'lib'
3
- group "Gibbler Gazette"
4
-
5
- Gibbler.enable_debug if Tryouts.verbose > 3
6
- Gibbler.digest_type = Digest::SHA1
7
-
8
- tryouts "Extended object tryouts" do
9
-
10
- dream :gibbler, 'f2b0150c84c5c834406ec9cdec989a0fa938b4ad'
11
- drill "true can gibbler", true
12
-
13
- dream :gibbler, 'abee839edf5f9c101c505c28987ca35c31c7fc8d'
14
- drill "false can gibbler", false
15
-
16
- dream :gibbler, '583fb214ec50d2c4a123cc52de0c65e801d13516'
17
- drill "TrueClass can gibbler", TrueClass
18
-
19
- dream :gibbler, '11f262be475ddf38a25888e9f6ec82f384a7c58b'
20
- drill "FalseClass can gibbler", FalseClass
21
-
22
- dream :gibbler, '25ac269ae3ef18cdb4143ad02ca315afb5026de9'
23
- drill "Class can gibbler", Class
24
-
25
- dream :gibbler, '5620e4a8b10ec6830fece61d33f5d3e9a349b4c2'
26
- drill "Object can gibbler", Object
27
-
28
- dream :gibbler, '083feec632e6cd5347e3fb3c7048365c3a0d710e'
29
- drill "Class instance can gibbler", Class.new
30
-
31
- dream :gibbler, '7295241e929ffd7cc974cf8d4481291e070937fc'
32
- drill "Module can gibbler", Module
33
-
34
- dream :gibbler, '6b5a192fd377dfc5c2828a3ad6105b68b6db33d5'
35
- drill "Module instance can gibbler", Module.new
36
-
37
- dream :gibbler, '8640f7abcbcb80e3825ed827bf36819e26119e16'
38
- drill "Proc can gibbler", Proc
39
-
40
- dream :gibbler, 'd73ae2a7bc2058b05dbc1952d8abf004167109e0'
41
- drill "Range instance (..) can gibbler", 1..100
42
-
43
- dream :gibbler, '46c8a7d0163144819c440bf6734a8101cd72c04a'
44
- drill "Range instance (...) can gibbler", 1...100
45
-
46
- drill "Range (..) doesn't equal range (...)", true do
47
- ('a'..'e').gibbler != ('a'...'e').gibbler
48
- end
49
-
50
- dream '06fdf26b2a64e90cd35ea9162d9cc48c9f6bb13c'
51
- drill "nil has a gibbler", nil.gibbler
52
-
53
-
54
- dream :gibbler, '7295241e929ffd7cc974cf8d4481291e070937fc'
55
- drill "Module can gibbler", Module
56
-
57
- dream :gibbler, '6b5a192fd377dfc5c2828a3ad6105b68b6db33d5'
58
- drill "Module instance can gibbler", Module.new
59
-
60
- dream :gibbler, '25ac269ae3ef18cdb4143ad02ca315afb5026de9'
61
- drill "Class can gibbler", Class
62
-
63
- end
64
-
65
-
66
- tryouts "Proc" do
67
-
68
- setup do
69
- class ::MyProc < Proc; end
70
- end
71
-
72
- dream :gibbler, '12075835e94be34438376cd7a54c8db7e746f15d'
73
- drill "Proc.new can gibbler", Proc.new() { }
74
-
75
- dream :gibbler, '8640f7abcbcb80e3825ed827bf36819e26119e16'
76
- drill "Proc can gibbler", Proc
77
-
78
- dream :gibbler, '12075835e94be34438376cd7a54c8db7e746f15d'
79
- drill "proc can gibbler", proc {}
80
-
81
- dream :gibbler, '12075835e94be34438376cd7a54c8db7e746f15d'
82
- drill "lambda can gibbler", lambda {}
83
-
84
- dream :gibbler, '12075835e94be34438376cd7a54c8db7e746f15d'
85
- drill "lambda gibbler is not aware of arity", lambda { |v| }
86
-
87
- dream :gibbler, '12075835e94be34438376cd7a54c8db7e746f15d'
88
- drill "proc gibbler is not aware of arity", proc { |v| }
89
-
90
- dream :gibbler, '12075835e94be34438376cd7a54c8db7e746f15d'
91
- drill "Proc gibbler is not aware of proc payload", proc { |v| 1; }
92
-
93
- dream :gibbler, "c979a45653acaddcb9c1581a7de49c94ac96e128"
94
- drill "MyProc has a different digest" do
95
- MyProc.new() { }
96
- end
97
- end
@@ -1,47 +0,0 @@
1
- require 'tempfile'
2
-
3
- library :gibbler, 'lib'
4
- group "Gibbler Gazette"
5
-
6
- Gibbler.enable_debug if Tryouts.verbose > 3
7
- Gibbler.digest_type = Digest::SHA1
8
-
9
- tryouts "File object tryouts" do
10
- set :tempfile, "tryouts-9000-awesome.txt"
11
-
12
- clean do
13
- File.unlink tempfile if File.exists? tempfile
14
- end
15
-
16
- dream :gibbler, '33027386bd95e91efc4711648d488519062d828f'
17
- drill "File can gibbler" do
18
- path = File.join(File.dirname(__FILE__), '..', 'CHANGES.txt')
19
- File.new(File.expand_path(path))
20
- end
21
-
22
- dream :gibbler, '4c131b7e5f9e7b841b4501d2d002785d3730ae19'
23
- drill "Gibbler is different for each path" do
24
- path = File.join(File.dirname(__FILE__), '..', 'README.rdoc')
25
- File.new(File.expand_path(path))
26
- end
27
-
28
- ## JRuby doesn't like to use File.new with directories
29
- ##dream :gibbler, '92cbcb7de73d7748b28d9e911f461013de34410f'
30
- ##drill "File gibbler cares about trailing slash (/tmp/)", File.new(__FILE__)
31
-
32
- dream :respond_to?, :gibbler
33
- drill "TempFile can gibbler", Tempfile.new('gibbler')
34
-
35
- drill "TempFile digests change", false do
36
- Tempfile.new('gibbler').gibbler == Tempfile.new('gibbler').gibbler
37
- end
38
-
39
- dream :gibbler, '6d93f752fc23f36bffa5ddf9ee97d04be82efbdb'
40
- drill "File doesn't care about file contents" do
41
- f = File.open tempfile, 'w'
42
- f.puts "World's Finest Number: " << "#{rand}"
43
- f.close
44
- stash :file_contents, File.read(tempfile)
45
- File.new tempfile
46
- end
47
- end
@@ -1,41 +0,0 @@
1
- require 'uri'
2
-
3
- library :gibbler, 'lib'
4
- group "Gibbler Gazette"
5
-
6
- Gibbler.enable_debug if Tryouts.verbose > 3
7
- Gibbler.digest_type = Digest::SHA1
8
-
9
- tryouts "URI object tryouts" do
10
-
11
- dream :gibbler, "9efe60a5db66aecf9b5fb8655b0bab0fcc7bd0c5"
12
- drill "URI::HTTP can gibbler" do
13
- uri = URI.parse "http://localhost:3114/spaceship"
14
- uri
15
- end
16
-
17
- dream :gibbler, "b75d3c34e60d6feafa796ddbb51e45710f6b106d"
18
- drill "URI::HTTPS can gibbler" do
19
- uri = URI.parse "https://localhost:3114/spaceship"
20
- uri
21
- end
22
-
23
- dream :gibbler, "191b0072b95ca0c79ed75e6deb5b28562dd9e5b9"
24
- drill "URI::HTTP is trailing slash sensitive" do
25
- uri = URI.parse "http://localhost:3114/spaceship/"
26
- uri
27
- end
28
-
29
- dream :gibbler, "d378372934326947113489d1f36f4853bef90a65"
30
- drill "URI::Generic can gibbler" do
31
- uri = URI.parse "localhost:3114/spaceship"
32
- uri
33
- end
34
-
35
- dream :gibbler, "9d0543b31afebac9e8d38c56a0cf12070779f790"
36
- drill "URI::FTP can gibbler" do
37
- uri = URI.parse "ftp://localhost:3114/spaceship"
38
- uri
39
- end
40
-
41
- end
@@ -1,35 +0,0 @@
1
- require 'date'
2
-
3
- library :gibbler, 'lib'
4
- group "Gibbler Gazette"
5
-
6
- Gibbler.enable_debug if Tryouts.verbose > 3
7
- Gibbler.digest_type = Digest::SHA1
8
-
9
- tryouts "Time tryouts" do
10
-
11
- dream :gibbler, 'c8403fc35481fdf7f6f4a0e7262b1c9610bdebaa'
12
- drill "Date instance can gibbler", Date.parse('2009-08-25')
13
-
14
- dream :gibbler, '73b4635fc63b8dd32b622776201f98a37478be90'
15
- drill "Time instance can gibbler", Time.parse('2009-08-25 16:43:53 UTC')
16
-
17
- dream :gibbler, 'd35546d6517c02f2a219ecfa2261a5274d217cb7'
18
- drill "Time instance can gibbler with single digit values" do
19
- Time.parse('2009-01-01 01:01:01 UTC')
20
- end
21
-
22
- dream :gibbler, 'ad64c7694a50becf55c53485dce5d0013ff65785'
23
- drill "DateTime instance can gibbler", DateTime.parse('2009-08-25T17:00:40+00:00')
24
-
25
- dream Time.parse('2009-08-25 12:43:53 -04:00').gibbler
26
- drill "Time digest is based on UTC" do
27
- Time.parse('2009-08-25 16:43:53 UTC').gibbler
28
- end
29
-
30
- dream DateTime.parse('2009-08-25T13:00:40-04:00').gibbler
31
- drill "DateTime digest is based on UTC" do
32
- DateTime.parse('2009-08-25T17:00:40+00:00').gibbler
33
- end
34
-
35
- end
@@ -1,42 +0,0 @@
1
-
2
- library :gibbler, File.dirname(__FILE__), '..', 'lib'
3
- library 'gibbler/history', File.dirname(__FILE__), '..', 'lib'
4
-
5
- group "History"
6
-
7
- tryouts "Basics" do
8
-
9
- dream "d7049916ddb25e6cc438b1028fb957e5139f9910"
10
- drill "can convert short digest into long" do
11
- a = { :magic => :original }
12
- g = a.gibbler_commit.short
13
- stash :short, g
14
- a.gibbler_find_long g
15
- end
16
-
17
- dream :class, Time
18
- drill "can return most recent stamp" do
19
- a = { :magic => :original }
20
- a.gibbler_commit
21
- stash :hist, a.gibbler_history
22
- a.gibbler_stamp
23
- end
24
-
25
- dream ["d7049916ddb25e6cc438b1028fb957e5139f9910", "0b11c377fccd44554a601e5d2b135c46dc1c4cb1"]
26
- drill "can return history" do
27
- a = { :magic => :original }
28
- a.gibbler_commit
29
- a[:magic] = :changed
30
- a.gibbler_commit
31
- a.gibbler_history
32
- end
33
-
34
- dream ["d7049916", "0b11c377"]
35
- drill "can return history (short)" do
36
- a = { :magic => :original }
37
- a.gibbler_commit
38
- a[:magic] = :changed
39
- a.gibbler_commit
40
- a.gibbler_history(:short)
41
- end
42
- end
@@ -1,91 +0,0 @@
1
-
2
-
3
- library :gibbler, File.dirname(__FILE__), '..', 'lib'
4
- library 'gibbler/history', File.dirname(__FILE__), '..', 'lib'
5
-
6
- group "History"
7
-
8
- Gibbler.enable_debug if Tryouts.verbose > 3
9
-
10
-
11
- tryouts "Hash History" do
12
-
13
- drill "Setup Hash class", Hash do
14
- class ::Hash
15
- include Gibbler::History
16
- end
17
- end
18
-
19
- drill "doesn't reveal self.__gibbler_history instance variable", false do
20
- a = {}
21
- a.gibbler # We need to gibbler first so it sets a value to the instance var
22
- val = Tryouts.sysinfo.ruby[1] == 9 ? :'self.__gibbler_history' : 'self.__gibbler_history'
23
- a.instance_variables.member? val
24
- end
25
-
26
- drill "can take a Hash snapshot", 'd7049916ddb25e6cc438b1028fb957e5139f9910' do
27
- a = { :magic => :original }
28
- a.gibbler_commit
29
- end
30
-
31
- dream :class, Array
32
- dream :size, 2
33
- dream ['d7049916ddb25e6cc438b1028fb957e5139f9910', 'b668098e16d08898532bf3aa33ce2253a3a4150e']
34
- drill "return a Hash history" do
35
- a = { :magic => :original }
36
- a.gibbler_commit
37
- a[:magic] = :updated
38
- a.gibbler_commit
39
- a.gibbler_history
40
- end
41
-
42
- dream 'd7049916ddb25e6cc438b1028fb957e5139f9910'
43
- drill "can revert Hash" do
44
- a = { :magic => :original }
45
- a.gibbler_commit
46
- a[:magic] = :updated
47
- a.gibbler_revert!
48
- end
49
-
50
- drill "knows a valid gibble", true do
51
- a = { :magic => :original }
52
- a.gibbler_commit
53
- a.gibbler_valid? 'd7049916ddb25e6cc438b1028fb957e5139f9910'
54
- end
55
-
56
- drill "knows an invalid gibble", false do
57
- a = { :magic => :original }
58
- a.gibbler_commit
59
- a.gibbler_valid? '2222222222222222222222222222222222222222'
60
- end
61
-
62
- dream Hash[:magic => :original]
63
- drill "can revert to any valid gibble" do
64
- a = { :magic => :original }
65
- a.gibbler_commit
66
- a[:magic] = :updated
67
- a.gibbler_commit
68
- a[:magic] = :changed
69
- a.gibbler_commit
70
- a.gibbler_revert! 'd7049916ddb25e6cc438b1028fb957e5139f9910'
71
- a
72
- end
73
-
74
- dream Hash[:magic => :original]
75
- dream :gibbler, 'd7049916ddb25e6cc438b1028fb957e5139f9910'
76
- drill "revert does nothing if digest is the same as current one" do
77
- a = { :magic => :original }
78
- a.gibbler_commit
79
- a.gibbler_revert!
80
- a
81
- end
82
-
83
- dream 'd7049916ddb25e6cc438b1028fb957e5139f9910'
84
- drill "can revert using short gibble" do
85
- a = { :magic => :original }
86
- a.gibbler_commit
87
- a[:magic] = :updated
88
- a.gibbler_revert! 'd7049916'
89
- end
90
-
91
- end
@@ -1,44 +0,0 @@
1
-
2
- library :gibbler, File.dirname(__FILE__), '..', 'lib'
3
- library 'gibbler/history', File.dirname(__FILE__), '..', 'lib'
4
-
5
- group "History"
6
-
7
- Gibbler.enable_debug if Tryouts.verbose > 3
8
-
9
-
10
- tryouts "Array History" do
11
-
12
- drill "Setup Array class", Array do
13
- class ::Array
14
- include Gibbler::History
15
- end
16
- end
17
-
18
- drill "can take a Array snapshot", 'd95fcabb498ae282f356eba63da541e4f72c6efa' do
19
- a = [:jesse]
20
- a.gibbler_commit
21
- end
22
-
23
- dream :class, Array
24
- dream :size, 2
25
- dream ['d95fcabb498ae282f356eba63da541e4f72c6efa', 'eebcb2e84e828b1a7207af4d588cf41fd4c6393a']
26
- drill "return an Array history" do
27
- a = [:jesse]
28
- a.gibbler_commit
29
- a << :joey
30
- a.gibbler_commit
31
- a.gibbler_history
32
- end
33
-
34
- dream 'd95fcabb498ae282f356eba63da541e4f72c6efa'
35
- drill "can revert Array" do
36
- a = [:jesse]
37
- stash :original, a.gibbler_commit
38
- a << :joey
39
- stash :updated, a.gibbler
40
- a.gibbler_revert!
41
- end
42
-
43
-
44
- end
@@ -1,43 +0,0 @@
1
- library :gibbler, File.dirname(__FILE__), '..', 'lib'
2
- library 'gibbler/history', File.dirname(__FILE__), '..', 'lib'
3
-
4
- group "History"
5
-
6
- Gibbler.enable_debug if Tryouts.verbose > 3
7
-
8
-
9
- tryouts "String History" do
10
-
11
- drill "Setup String class", String do
12
- class ::String
13
- include Gibbler::History
14
- end
15
- end
16
-
17
- drill "can take a String snapshot", 'c8027100ecc54945ab15ddac529230e38b1ba6a1' do
18
- a = "kimmy"
19
- a.gibbler_commit
20
- end
21
-
22
- dream :class, Array
23
- dream :size, 2
24
- dream ['c8027100ecc54945ab15ddac529230e38b1ba6a1', '692c05d3186baf2da36e87b7bc5fe53ef13b902e']
25
- drill "return a String history" do
26
- a = "kimmy"
27
- a.gibbler_commit
28
- a << " gibbler"
29
- a.gibbler_commit
30
- a.gibbler_history
31
- end
32
-
33
- dream 'c8027100ecc54945ab15ddac529230e38b1ba6a1'
34
- drill "can revert String" do
35
- a = "kimmy"
36
- stash :original, a.gibbler_commit
37
- a << " gibbler"
38
- stash :updated, a.gibbler
39
- a.gibbler_revert!
40
- end
41
-
42
- end
43
-
@@ -1,45 +0,0 @@
1
- library :gibbler, File.dirname(__FILE__), '..', 'lib'
2
- library 'gibbler/history', File.dirname(__FILE__), '..', 'lib'
3
-
4
- group "History"
5
-
6
- Gibbler.enable_debug if Tryouts.verbose > 3
7
-
8
-
9
-
10
- tryouts "Arbitrary Object History" do
11
-
12
- drill "Setup String class", 'FullHouse' do
13
- class ::FullHouse
14
- include Gibbler::Complex
15
- include Gibbler::History
16
- attr_accessor :roles
17
- end
18
- FullHouse.to_s
19
- end
20
-
21
- drill "can take a FullHouse snapshot", '4192d4cb59975813f117a51dcd4454ac16df6703' do
22
- a = FullHouse.new
23
- a.gibbler_commit
24
- end
25
-
26
- dream ['4192d4cb59975813f117a51dcd4454ac16df6703', '2c6957aa1e734d2a3a71caf569a7461a3bf26f11']
27
- drill "return a FullHouse history" do
28
- a = FullHouse.new
29
- a.gibbler_commit
30
- a.roles = [:jesse]
31
- a.gibbler_commit
32
- a.gibbler_history
33
- end
34
-
35
- dream '4192d4cb59975813f117a51dcd4454ac16df6703'
36
- drill "can revert FullHouse" do
37
- a = FullHouse.new
38
- stash :original, a.gibbler_commit
39
- a.roles = [:jesse]
40
- stash :updated, a.gibbler
41
- a.gibbler_revert!
42
- end
43
-
44
- end
45
-