public
Description: Rubinius, the Ruby VM
Homepage: http://rubini.us
Clone URL: git://github.com/evanphx/rubinius.git
Preliminary changes to use instance_eval in MSpec.
brixen (author)
Sat Feb 23 00:07:06 -0800 2008
commit  10a2dc0583f0910e34f9cf4aadb371d46c37c3a4
tree    62143d7d489cb19e1a3505e286e4b2862b457a28
parent  714efa8574687e1fd31f904a4f35cce8056719f5
...
5
6
7
 
8
9
10
11
12
13
 
 
14
15
16
17
18
19
 
 
20
21
...
5
6
7
8
9
10
11
12
 
 
13
14
15
16
17
18
 
 
19
20
21
22
0
@@ -5,17 +5,18 @@ describe Object, "#ruby_bug" do
0
   before :each do
0
     @guard = BugGuard.new
0
     BugGuard.stub!(:new).and_return(@guard)
0
+ ScratchPad.clear
0
   end
0
   
0
   it "yields when the implementation is not :ruby" do
0
     @guard.stub!(:implementation?).and_return(false)
0
- ruby_bug { @record = :yield }
0
- @record.should == :yield
0
+ ruby_bug { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
   
0
   it "does not yield when the implementation is :ruby" do
0
     @guard.stub!(:implementation?).and_return(true)
0
- ruby_bug { @record = :yield }
0
- @record.should_not == :yield
0
+ ruby_bug { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
 end
...
5
6
7
 
8
9
10
11
12
13
14
 
 
15
16
17
18
19
20
21
 
 
22
23
24
25
26
 
 
27
28
29
30
31
32
33
 
 
34
35
36
...
38
39
40
 
41
42
43
44
45
46
47
 
 
48
49
50
51
52
53
54
 
 
55
56
57
58
59
 
 
60
61
62
63
64
65
66
 
 
67
68
...
5
6
7
8
9
10
11
12
13
 
 
14
15
16
17
18
19
20
 
 
21
22
23
24
25
 
 
26
27
28
29
30
31
32
 
 
33
34
35
36
37
...
39
40
41
42
43
44
45
46
47
 
 
48
49
50
51
52
53
54
 
 
55
56
57
58
59
 
 
60
61
62
63
64
65
66
 
 
67
68
69
70
0
@@ -5,32 +5,33 @@ describe Object, "#compliant_on" do
0
   before :each do
0
     @guard = ComplianceGuard.new
0
     ComplianceGuard.stub!(:new).and_return(@guard)
0
+ ScratchPad.clear
0
   end
0
   
0
   it "does not yield when #implementation? and #platform? return false" do
0
     @guard.stub!(:implementation?).and_return(false)
0
     @guard.stub!(:platform?).and_return(false)
0
- compliant_on(:rbx) { @record = :yield }
0
- @record.should_not == :yield
0
+ compliant_on(:rbx) { @ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
   
0
   it "yields when #implementation? or #platform? return true" do
0
     @guard.stub!(:implementation?).and_return(true)
0
     @guard.stub!(:platform?).and_return(false)
0
- compliant_on(:rbx) { @record = :yield }
0
- @record.should == :yield
0
+ compliant_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
 
0
     @guard.stub!(:implementation?).and_return(false)
0
     @guard.stub!(:platform?).and_return(true)
0
- compliant_on(:rbx) { @record = :yield }
0
- @record.should == :yield
0
+ compliant_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
   
0
   it "yields when #implementation? and #platform? return true" do
0
     @guard.stub!(:implementation?).and_return(true)
0
     @guard.stub!(:platform?).and_return(true)
0
- compliant_on(:rbx) { @record = :yield }
0
- @record.should == :yield
0
+ compliant_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
 end
0
 
0
@@ -38,31 +39,32 @@ describe Object, "#not_compliant_on" do
0
   before :each do
0
     @guard = ComplianceGuard.new
0
     ComplianceGuard.stub!(:new).and_return(@guard)
0
+ ScratchPad.clear
0
   end
0
   
0
   it "does not yield when #implementation? and #platform? return true" do
0
     @guard.stub!(:implementation?).and_return(true)
0
     @guard.stub!(:platform?).and_return(true)
0
- not_compliant_on(:rbx) { @record = :yield }
0
- @record.should_not == :yield
0
+ not_compliant_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
   
0
   it "does not yield when #implementation? or #platform? return true" do
0
     @guard.stub!(:implementation?).and_return(true)
0
     @guard.stub!(:platform?).and_return(false)
0
- not_compliant_on(:rbx) { @record = :yield }
0
- @record.should_not == :yield
0
+ not_compliant_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
 
0
     @guard.stub!(:implementation?).and_return(false)
0
     @guard.stub!(:platform?).and_return(true)
0
- not_compliant_on(:rbx) { @record = :yield }
0
- @record.should_not == :yield
0
+ not_compliant_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
   
0
   it "yields when #implementation? and #platform? return false" do
0
     @guard.stub!(:implementation?).and_return(false)
0
     @guard.stub!(:platform?).and_return(false)
0
- not_compliant_on(:rbx) { @record = :yield }
0
- @record.should == :yield
0
+ not_compliant_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
 end
...
5
6
7
 
8
9
10
11
12
13
 
 
14
15
16
17
18
19
 
 
20
21
22
...
24
25
26
 
27
28
29
30
31
32
 
 
33
34
35
36
37
38
 
 
39
40
...
5
6
7
8
9
10
11
12
 
 
13
14
15
16
17
18
 
 
19
20
21
22
23
...
25
26
27
28
29
30
31
32
 
 
33
34
35
36
37
38
 
 
39
40
41
42
0
@@ -5,18 +5,19 @@ describe Object, "#big_endian" do
0
   before :each do
0
     @guard = BigEndianGuard.new
0
     BigEndianGuard.stub!(:new).and_return(@guard)
0
+ ScratchPad.clear
0
   end
0
   
0
   it "yields on big-endian platforms" do
0
     @guard.stub!(:pattern).and_return([1])
0
- big_endian { @record = :yield }
0
- @record.should == :yield
0
+ big_endian { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
   
0
   it "does not yield on little-endian platforms" do
0
     @guard.stub!(:pattern).and_return([0])
0
- big_endian { @record = :yield }
0
- @record.should_not == :yield
0
+ big_endian { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
 end
0
 
0
@@ -24,17 +25,18 @@ describe Object, "#little_endian" do
0
   before :each do
0
     @guard = LittleEndianGuard.new
0
     LittleEndianGuard.stub!(:new).and_return(@guard)
0
+ ScratchPad.clear
0
   end
0
   
0
   it "yields on little-endian platforms" do
0
     @guard.stub!(:pattern).and_return([0])
0
- little_endian { @record = :yield }
0
- @record.should == :yield
0
+ little_endian { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
   
0
   it "does not yield on big-endian platforms" do
0
     @guard.stub!(:pattern).and_return([1])
0
- little_endian { @record = :yield }
0
- @record.should_not == :yield
0
+ little_endian { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
 end
...
5
6
7
 
8
9
10
11
12
13
14
 
 
15
16
17
18
19
20
21
 
 
22
23
24
25
26
 
 
27
28
29
30
31
32
33
 
 
34
35
...
5
6
7
8
9
10
11
12
13
 
 
14
15
16
17
18
19
20
 
 
21
22
23
24
25
 
 
26
27
28
29
30
31
32
 
 
33
34
35
36
0
@@ -5,31 +5,32 @@ describe Object, "#extended_on" do
0
   before :each do
0
     @guard = ExtensionsGuard.new
0
     ExtensionsGuard.stub!(:new).and_return(@guard)
0
+ ScratchPad.clear
0
   end
0
   
0
   it "does not yield when #implementation? and #platform? return false" do
0
     @guard.stub!(:implementation?).and_return(false)
0
     @guard.stub!(:platform?).and_return(false)
0
- extended_on(:rbx) { @record = :yield }
0
- @record.should_not == :yield
0
+ extended_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
   
0
   it "yields when #implementation? or #platform? return true" do
0
     @guard.stub!(:implementation?).and_return(true)
0
     @guard.stub!(:platform?).and_return(false)
0
- extended_on(:rbx) { @record = :yield }
0
- @record.should == :yield
0
+ extended_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
 
0
     @guard.stub!(:implementation?).and_return(false)
0
     @guard.stub!(:platform?).and_return(true)
0
- extended_on(:rbx) { @record = :yield }
0
- @record.should == :yield
0
+ extended_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
   
0
   it "yields when #implementation? and #platform? return true" do
0
     @guard.stub!(:implementation?).and_return(true)
0
     @guard.stub!(:platform?).and_return(true)
0
- extended_on(:rbx) { @record = :yield }
0
- @record.should == :yield
0
+ extended_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
 end
...
5
6
7
 
8
9
10
11
12
13
14
 
 
15
16
17
18
19
20
21
 
 
22
23
24
25
26
 
 
27
28
29
30
31
32
33
 
 
34
35
...
5
6
7
8
9
10
11
12
13
 
 
14
15
16
17
18
19
20
 
 
21
22
23
24
25
 
 
26
27
28
29
30
31
32
 
 
33
34
35
36
0
@@ -5,31 +5,32 @@ describe Object, "#deviates_on" do
0
   before :each do
0
     @guard = NonComplianceGuard.new
0
     NonComplianceGuard.stub!(:new).and_return(@guard)
0
+ ScratchPad.clear
0
   end
0
   
0
   it "does not yield when #implementation? and #platform? return false" do
0
     @guard.stub!(:implementation?).and_return(false)
0
     @guard.stub!(:platform?).and_return(false)
0
- deviates_on(:rbx) { @record = :yield }
0
- @record.should_not == :yield
0
+ deviates_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
   
0
   it "yields when #implementation? or #platform? return true" do
0
     @guard.stub!(:implementation?).and_return(true)
0
     @guard.stub!(:platform?).and_return(false)
0
- deviates_on(:rbx) { @record = :yield }
0
- @record.should == :yield
0
+ deviates_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
 
0
     @guard.stub!(:implementation?).and_return(false)
0
     @guard.stub!(:platform?).and_return(true)
0
- deviates_on(:rbx) { @record = :yield }
0
- @record.should == :yield
0
+ deviates_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
   
0
   it "yields when #implementation? and #platform? return true" do
0
     @guard.stub!(:implementation?).and_return(true)
0
     @guard.stub!(:platform?).and_return(true)
0
- deviates_on(:rbx) { @record = :yield }
0
- @record.should == :yield
0
+ deviates_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
 end
...
20
21
22
 
23
24
25
26
27
28
 
 
29
30
31
32
33
34
 
 
35
36
37
...
39
40
41
 
42
43
44
45
46
47
 
 
48
49
50
51
52
53
 
 
54
55
56
...
59
60
61
 
62
63
64
65
66
67
 
 
68
69
70
71
72
73
 
 
74
75
76
...
79
80
81
 
82
83
84
85
86
87
 
 
88
89
90
91
92
93
 
 
94
95
...
20
21
22
23
24
25
26
27
 
 
28
29
30
31
32
33
 
 
34
35
36
37
38
...
40
41
42
43
44
45
46
47
 
 
48
49
50
51
52
53
 
 
54
55
56
57
58
...
61
62
63
64
65
66
67
68
 
 
69
70
71
72
73
74
 
 
75
76
77
78
79
...
82
83
84
85
86
87
88
89
 
 
90
91
92
93
94
95
 
 
96
97
98
99
0
@@ -20,18 +20,19 @@ describe Object, "#platform_is" do
0
   before :each do
0
     @guard = PlatformGuard.new :dummy
0
     PlatformGuard.stub!(:new).and_return(@guard)
0
+ ScratchPad.clear
0
   end
0
 
0
   it "does not yield when #platform? returns false" do
0
     @guard.stub!(:platform?).and_return(false)
0
- platform_is(:ruby) { @record = :yield }
0
- @record.should_not == :yield
0
+ platform_is(:ruby) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
   
0
   it "yields when #platform? returns true" do
0
     @guard.stub!(:platform?).and_return(true)
0
- platform_is(:solarce) { @record = :yield }
0
- @record.should == :yield
0
+ platform_is(:solarce) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
 end
0
 
0
@@ -39,18 +40,19 @@ describe Object, "#platform_is_not" do
0
   before :each do
0
     @guard = PlatformGuard.new :dummy
0
     PlatformGuard.stub!(:new).and_return(@guard)
0
+ ScratchPad.clear
0
   end
0
   
0
   it "does not yield when #platform? returns true" do
0
     @guard.stub!(:platform?).and_return(true)
0
- platform_is_not(:ruby) { @record = :yield }
0
- @record.should_not == :yield
0
+ platform_is_not(:ruby) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
   
0
   it "yields when #platform? returns false" do
0
     @guard.stub!(:platform?).and_return(false)
0
- platform_is_not(:solarce) { @record = :yield }
0
- @record.should == :yield
0
+ platform_is_not(:solarce) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
 end
0
 
0
@@ -59,18 +61,19 @@ describe Object, "#platform_is :wordsize => SIZE_SPEC" do
0
     @guard = PlatformGuard.new :darwin, :wordsize => 32
0
     @guard.stub!(:platform?).and_return(true)
0
     PlatformGuard.stub!(:new).and_return(@guard)
0
+ ScratchPad.clear
0
   end
0
   
0
   it "yields when #wordsize? returns true" do
0
     @guard.stub!(:wordsize?).and_return(true)
0
- platform_is(:wordsize => 32) { @record = :yield }
0
- @record.should == :yield
0
+ platform_is(:wordsize => 32) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
   
0
   it "doesn not yield when #wordsize? returns false" do
0
     @guard.stub!(:wordsize?).and_return(false)
0
- platform_is(:wordsize => 32) { @record = :yield }
0
- @record.should_not == :yield
0
+ platform_is(:wordsize => 32) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
 end
0
 
0
@@ -79,17 +82,18 @@ describe Object, "#platform_is_not :wordsize => SIZE_SPEC" do
0
     @guard = PlatformGuard.new :darwin, :wordsize => 32
0
     @guard.stub!(:platform?).and_return(true)
0
     PlatformGuard.stub!(:new).and_return(@guard)
0
+ ScratchPad.clear
0
   end
0
   
0
   it "yields when #wordsize? returns false" do
0
     @guard.stub!(:wordsize?).and_return(false)
0
- platform_is_not(:wordsize => 32) { @record = :yield }
0
- @record.should == :yield
0
+ platform_is_not(:wordsize => 32) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
   
0
   it "doesn not yield when #wordsize? returns true" do
0
     @guard.stub!(:wordsize?).and_return(true)
0
- platform_is_not(:wordsize => 32) { @record = :yield }
0
- @record.should_not == :yield
0
+ platform_is_not(:wordsize => 32) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
 end
...
8
9
10
 
 
 
 
11
12
13
 
 
14
15
...
8
9
10
11
12
13
14
15
 
 
16
17
18
19
0
@@ -8,8 +8,12 @@ describe QuarantineGuard, "#match?" do
0
 end
0
 
0
 describe Object, "#quarantine!" do
0
+ before :each do
0
+ ScratchPad.clear
0
+ end
0
+
0
   it "does not yield" do
0
- quarantine! { @record = :yield }
0
- @record.should_not == :yield
0
+ quarantine! { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
 end
...
38
39
40
 
41
42
43
44
45
46
 
 
47
48
49
50
51
52
 
 
53
54
55
...
57
58
59
 
60
61
62
63
64
65
 
 
66
67
68
69
70
71
 
 
72
73
...
38
39
40
41
42
43
44
45
 
 
46
47
48
49
50
51
 
 
52
53
54
55
56
...
58
59
60
61
62
63
64
65
 
 
66
67
68
69
70
71
 
 
72
73
74
75
0
@@ -38,18 +38,19 @@ describe Object, "#runner_is" do
0
   before :each do
0
     @guard = RunnerGuard.new
0
     RunnerGuard.stub!(:new).and_return(@guard)
0
+ ScratchPad.clear
0
   end
0
   
0
   it "yields when #match? returns true" do
0
     @guard.stub!(:match?).and_return(true)
0
- runner_is(:mspec) { @record = :yield }
0
- @record.should == :yield
0
+ runner_is(:mspec) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
   
0
   it "does not yield when #match? returns false" do
0
     @guard.stub!(:match?).and_return(false)
0
- runner_is(:mspec) { @record = :yield }
0
- @record.should_not == :yield
0
+ runner_is(:mspec) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
 end
0
 
0
@@ -57,17 +58,18 @@ describe Object, "#runner_is_not" do
0
   before :each do
0
     @guard = RunnerGuard.new
0
     RunnerGuard.stub!(:new).and_return(@guard)
0
+ ScratchPad.clear
0
   end
0
   
0
   it "does not yield when #match? returns true" do
0
     @guard.stub!(:match?).and_return(true)
0
- runner_is_not(:mspec) { @record = :yield }
0
- @record.should_not == :yield
0
+ runner_is_not(:mspec) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
   
0
   it "yields when #match? returns false" do
0
     @guard.stub!(:match?).and_return(false)
0
- runner_is_not(:mspec) { @record = :yield }
0
- @record.should == :yield
0
+ runner_is_not(:mspec) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
 end
...
5
6
7
 
8
9
10
11
12
13
 
 
14
15
16
17
18
19
 
 
20
21
...
5
6
7
8
9
10
11
12
 
 
13
14
15
16
17
18
 
 
19
20
21
22
0
@@ -5,17 +5,18 @@ describe Object, "#not_supported_on" do
0
   before :each do
0
     @guard = SupportedGuard.new
0
     SupportedGuard.stub!(:new).and_return(@guard)
0
+ ScratchPad.clear
0
   end
0
   
0
   it "does not yield when #implementation? returns true" do
0
     @guard.stub!(:implementation?).and_return(true)
0
- not_supported_on(:rbx) { @record = :yield }
0
- @record.should_not == :yield
0
+ not_supported_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should_not == :yield
0
   end
0
 
0
   it "yields when #implementation? returns false" do
0
     @guard.stub!(:implementation?).and_return(false)
0
- not_supported_on(:rbx) { @record = :yield }
0
- @record.should == :yield
0
+ not_supported_on(:rbx) { ScratchPad.record :yield }
0
+ ScratchPad.recorded.should == :yield
0
   end
0
 end
...
61
62
63
 
64
65
66
...
72
73
74
75
76
 
 
77
78
79
80
81
82
83
 
84
85
86
...
88
89
90
91
 
92
93
94
...
110
111
112
113
 
114
115
 
116
117
 
118
119
120
...
126
127
128
129
 
130
131
132
...
157
158
159
160
161
 
 
162
163
164
165
166
167
 
 
168
169
170
...
178
179
180
181
 
182
183
184
 
185
186
187
188
189
 
190
191
192
 
193
194
195
...
208
209
210
211
 
212
213
214
 
215
216
217
...
61
62
63
64
65
66
67
...
73
74
75
 
 
76
77
78
79
80
81
82
83
 
84
85
86
87
...
89
90
91
 
92
93
94
95
...
111
112
113
 
114
115
 
116
117
 
118
119
120
121
...
127
128
129
 
130
131
132
133
...
158
159
160
 
 
161
162
163
164
165
166
 
 
167
168
169
170
171
...
179
180
181
 
182
183
184
 
185
186
187
188
189
 
190
191
192
 
193
194
195
196
...
209
210
211
 
212
213
214
 
215
216
217
218
0
@@ -61,6 +61,7 @@ describe MSpec, ".protect" do
0
     @rs = mock('RunState')
0
     @rs.stub!(:state).and_return(@ss)
0
     @exception = Exception.new("Sharp!")
0
+ ScratchPad.record @exception
0
   end
0
   
0
   it "rescues any exceptions raised when executing the block argument" do
0
@@ -72,15 +73,15 @@ describe MSpec, ".protect" do
0
   
0
   it "records the exception in the current.state object's exceptions" do
0
     MSpec.stack.push @rs
0
- MSpec.protect("testing") { raise @exception }
0
- @ss.exceptions.should == [["testing", @exception]]
0
+ MSpec.protect("testing") { raise ScratchPad.recorded }
0
+ @ss.exceptions.should == [["testing", ScratchPad.recorded]]
0
   end
0
   
0
   it "writes a message to STDERR if current is nil" do
0
     STDERR.stub!(:write)
0
     STDERR.should_receive(:write).with("\nAn exception occurred in testing:\nException: \"Sharp!\"\n")
0
     MSpec.stack.clear
0
- MSpec.protect("testing") { raise @exception}
0
+ MSpec.protect("testing") { raise ScratchPad.recorded }
0
   end
0
   
0
   it "writes a message to STDERR if current.state is nil" do
0
@@ -88,7 +89,7 @@ describe MSpec, ".protect" do
0
     STDERR.should_receive(:write).with("\nAn exception occurred in testing:\nException: \"Sharp!\"\n")
0
     @rs.stub!(:state).and_return(nil)
0
     MSpec.stack.push @rs
0
- MSpec.protect("testing") { raise @exception}
0
+ MSpec.protect("testing") { raise ScratchPad.recorded }
0
   end
0
 end
0
 
0
@@ -110,11 +111,11 @@ end
0
 describe MSpec, ".actions" do
0
   before :each do
0
     MSpec.store :start, []
0
- @record = []
0
+ ScratchPad.record []
0
     start_one = mock("one")
0
- start_one.stub!(:start).and_return { @record << :one }
0
+ start_one.stub!(:start).and_return { ScratchPad << :one }
0
     start_two = mock("two")
0
- start_two.stub!(:start).and_return { @record << :two }
0
+ start_two.stub!(:start).and_return { ScratchPad << :two }
0
     MSpec.register :start, start_one
0
     MSpec.register :start, start_two
0
   end
0
@@ -126,7 +127,7 @@ describe MSpec, ".actions" do
0
   
0
   it "runs each action registered as a start action" do
0
     MSpec.actions :start
0
- @record.should == [:one, :two]
0
+ ScratchPad.recorded.should == [:one, :two]
0
   end
0
 end
0
 
0
@@ -157,14 +158,14 @@ end
0
 describe MSpec, ".describe" do
0
   it "pushes a new RunState instance on the stack" do
0
     MSpec.stack.clear
0
- MSpec.describe(Object, "msg") { @record = MSpec.current }
0
- @record.should be_kind_of(RunState)
0
+ MSpec.describe(Object, "msg") { ScratchPad.record MSpec.current }
0
+ ScratchPad.recorded.should be_kind_of(RunState)
0
   end
0
   
0
   it "pops the RunState instance off the stack when finished" do
0
     MSpec.stack.clear
0
- MSpec.describe(Object, "msg") { @record = MSpec.current }
0
- @record.should be_kind_of(RunState)
0
+ MSpec.describe(Object, "msg") { ScratchPad.record MSpec.current }
0
+ ScratchPad.recorded.should be_kind_of(RunState)
0
     MSpec.stack.should == []
0
   end
0
 end
0
@@ -178,18 +179,18 @@ describe MSpec, ".process" do
0
   
0
   it "calls all start actions" do
0
     start = mock("start")
0
- start.stub!(:start).and_return { @record = :start }
0
+ start.stub!(:start).and_return { ScratchPad.record :start }
0
     MSpec.register :start, start
0
     MSpec.process
0
- @record.should == :start
0
+ ScratchPad.recorded.should == :start
0
   end
0
   
0
   it "calls all finish actions" do
0
     finish = mock("finish")
0
- finish.stub!(:finish).and_return { @record = :finish }
0
+ finish.stub!(:finish).and_return { ScratchPad.record :finish }
0
     MSpec.register :finish, finish
0
     MSpec.process
0
- @record.should == :finish
0
+ ScratchPad.recorded.should == :finish
0
   end
0
   
0
   it "calls the files method" do
0
@@ -208,10 +209,10 @@ describe MSpec, ".files" do
0
   
0
   it "calls load actions before each file" do
0
     load = mock("load")
0
- load.stub!(:load).and_return { @record = :load }
0
+ load.stub!(:load).and_return { ScratchPad.record :load }
0
     MSpec.register :load, load
0
     MSpec.files
0
- @record.should == :load
0
+ ScratchPad.recorded.should == :load
0
   end
0
   
0
   it "registers the current file" do