quicktest 0.5.7 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -89,7 +89,7 @@ require 'rake/gempackagetask'
89
89
  spec = Gem::Specification.new do |s|
90
90
  s.name = $project
91
91
  s.rubyforge_project = $project
92
- s.version = "0.5.7"
92
+ s.version = "0.6.0"
93
93
  s.author = "Greg Weber"
94
94
  s.email = "greg@gregweber.info"
95
95
  s.homepage = "http://quicktest.rubyfore.org/"
data/doc/created.rid CHANGED
@@ -1 +1 @@
1
- Mon, 28 Apr 2008 00:16:33 -0500
1
+ Mon, 28 Apr 2008 00:33:03 -0500
data/lib/quicktest.rb CHANGED
@@ -145,7 +145,7 @@ module QuickTest
145
145
  end
146
146
 
147
147
  if traced == QuickTest.test_method
148
- QuickTest.runner.new self
148
+ QuickTest.runner.new self
149
149
 
150
150
  elsif traced == :quicktest_include_into
151
151
  QuickTest.include_module_into = self.quicktest_include_into
@@ -165,13 +165,25 @@ module QuickTest
165
165
  return if traced == qt.runner.methods.last
166
166
 
167
167
  if traced == QuickTest.test_method
168
- qt.runner.new(
169
- if self.class != Module
170
- self.new
171
- else
172
- Class.new(QuickTest.include_module_into || Object).extend(self)
173
- end
174
- )
168
+ begin
169
+ qt.runner.new(
170
+ if self.class != Module
171
+ self.new
172
+ else
173
+ Class.new(QuickTest.include_module_into || Object).extend(self)
174
+ end
175
+ )
176
+ rescue ArgumentError
177
+ puts <<-EOS
178
+ method:
179
+ #{qt.runner.methods.last}
180
+ object initialization requires arguments, use:
181
+ "def self.quicktest"
182
+ instead of:
183
+ "def quicktest"
184
+ EOS
185
+ exit(1)
186
+ end
175
187
 
176
188
  else
177
189
  unless qt.ignore_first_method_added or
data/spec/test_result.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  .....FFFFFFFFF
2
2
 
3
3
  1)
4
- '#<Object:0xb7b72b9c> should show class name in output' FAILED
4
+ '#<Object:0xb7ba8954> should show class name in output' FAILED
5
5
  expected: /^'#<Object:0x[^>]+> should show class name in output' FAILED$/,
6
6
  got: nil (using =~)
7
7
  ./test.rb:58:in `quicktest'
@@ -9,7 +9,7 @@ expected: /^'#<Object:0x[^>]+> should show class name in output' FAILED$/,
9
9
  ../lib/quicktest.rb:109:in `__quicktest_run_tests__'
10
10
 
11
11
  2)
12
- '#<Object:0xb7b72098> new_method_added should show name of added method' FAILED
12
+ '#<Object:0xb7ba80a8> new_method_added should show name of added method' FAILED
13
13
  expected: /^'#<Object:0x[^>]+> new_method_added should show name of added method' FAILED$/,
14
14
  got: nil (using =~)
15
15
  ./test.rb:68:in `quicktest'
@@ -33,7 +33,7 @@ expected: /^'TestModule new_singleton_method_added should show class name in out
33
33
  ../lib/quicktest.rb:109:in `__quicktest_run_tests__'
34
34
 
35
35
  5)
36
- '#<Class:0xb7b6fa8c> the_method should include the module into class Object' FAILED
36
+ '#<Class:0xb7ba61f4> the_method should include the module into class Object' FAILED
37
37
  expected: /^'#<Class:0x[^>]+> the_method should include the module into class Object' FAILED$/,
38
38
  got: nil (using =~)
39
39
  ./test.rb:98:in `quicktest'
@@ -49,7 +49,7 @@ expected: /^'TestClass should show class name in output' FAILED$/,
49
49
  ../lib/quicktest.rb:109:in `__quicktest_run_tests__'
50
50
 
51
51
  7)
52
- '#<TestClass:0xb7b6e8bc> should show class name in output' FAILED
52
+ '#<TestClass:0xb7ba47c8> should show class name in output' FAILED
53
53
  expected: /^'#<TestClass:0x[^>]+> should show class name in output' FAILED$/,
54
54
  got: nil (using =~)
55
55
  ./test.rb:116:in `quicktest'
@@ -57,7 +57,7 @@ expected: /^'#<TestClass:0x[^>]+> should show class name in output' FAILED$/,
57
57
  ../lib/quicktest.rb:109:in `__quicktest_run_tests__'
58
58
 
59
59
  8)
60
- '#<TestClass:0xb7b6de58> new_method_added should show name of added method' FAILED
60
+ '#<TestClass:0xb7ba3d64> new_method_added should show name of added method' FAILED
61
61
  expected: /^'#<TestClass:0x[^>]+> new_method_added should show name of added method' FAILED$/,
62
62
  got: nil (using =~)
63
63
  ./test.rb:126:in `quicktest'
@@ -72,6 +72,6 @@ expected: /^'TestClass new_singleton_method_added should show class name in outp
72
72
  ../lib/quicktest.rb:109:in `call'
73
73
  ../lib/quicktest.rb:109:in `__quicktest_run_tests__'
74
74
 
75
- Finished in 0.051081 seconds
75
+ Finished in 0.034129 seconds
76
76
 
77
77
  14 examples, 9 failures
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quicktest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Weber