quicktest 0.5.0 → 0.5.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.
data/doc/created.rid CHANGED
@@ -1 +1 @@
1
- Sun, 09 Mar 2008 12:19:06 -0500
1
+ Mon, 10 Mar 2008 20:04:47 -0500
Binary file
data/rakefile CHANGED
@@ -1,32 +1,54 @@
1
1
  project = 'quicktest'
2
- def test_dir; Dir.chdir('test') {|dir| yield dir } end
2
+ def test_dir; Dir.chdir('spec') {|dir| yield dir } end
3
+
4
+ def run command
5
+ res = `#{command}`
6
+ exit $?.exitstatus if $?.exitstatus != 0
7
+ res
8
+ end
3
9
 
4
10
  desc "test"
5
11
  task :test do
6
- run = 'spec -r ../lib/quicktest test.rb'
7
- test_dir {puts `#{run} >| test_result.txt || #{run}`}
8
- exit $?.exitstatus if $?.exitstatus != 0
12
+ t = 'spec -r ../lib/quicktest test.rb'
13
+ test_dir {(puts (run "#{t} >| test_result.txt || #{t}"))}
9
14
  end
10
15
 
11
16
  namespace :test do
12
17
  run = '../bin/quickspec test.rb'
13
18
  task :generate do
14
- test_dir {`#{run} >| test_result.txt`}
15
- exit $?.exitstatus if $?.exitstatus != 0
19
+ test_dir {run "#{run} >| test_result.txt"}
16
20
  end
17
21
 
18
22
  desc "test quickspec executable"
19
23
  task :quickspec => :generate do
20
- test_dir {puts `#{run}`}
21
- exit $?.exitstatus if $?.exitstatus != 0
24
+ test_dir {(puts (run "#{run}"))}
22
25
  end
23
26
 
24
27
  desc "test readme file"
25
28
  task :README do
26
- puts `./bin/quickspec README`
27
- exit $?.exitstatus if $?.exitstatus != 0
29
+ (puts (run "./bin/quickspec README"))
30
+ end
31
+ end
32
+
33
+ =begin
34
+ require 'rubygems'
35
+ require 'spec/rake/spectask'
36
+ desc "Run all examples with RCov"
37
+ Spec::Rake::SpecTask.new('rcov') do |t|
38
+ t.spec_files = ['spec/*.rb']
39
+ t.rcov = true
40
+ t.rcov_opts = ['--exclude', 'spec']
41
+ end
42
+
43
+ namespace :rcov do
44
+ require 'spec/rake/verify_rcov'
45
+ # rcov is wrong- I am actually at 100%
46
+ RCov::VerifyTask.new(:verify => :spec) do |t|
47
+ t.threshold = 86.7 # Make sure you have rcov 0.7 or higher!
48
+ t.index_html = 'coverage/lib-import_rb.html'
28
49
  end
29
50
  end
51
+ =end
30
52
 
31
53
  class IO
32
54
  def self.write( file, str )
@@ -74,7 +96,11 @@ namespace :readme do
74
96
  end
75
97
 
76
98
  desc "create html for website using coderay, use --silent option"
77
- task :html => :rdoc do
99
+ task :html do
100
+ rm_rf 'doc'
101
+ decode_readme do
102
+ fail unless system 'rdoc --force-update --quiet README'
103
+ end
78
104
  require 'hpricot'
79
105
  doc = open( 'doc/files/README.html' ) { |f| Hpricot(f) }
80
106
  # find example code
@@ -92,7 +118,7 @@ task :release => [:rdoc,:package] do
92
118
  Dir.chdir('pkg') do
93
119
  release = Dir['*.gem'].sort_by {|file| File.mtime(file)}.last
94
120
  release =~ /^[^-]+-([.0-9]+).gem$/
95
- `rubyforge login && rubyforge add_release #{project} #{project} #$1 #{release}`
121
+ (puts (run "rubyforge login && rubyforge add_release #{project} #{project} #$1 #{release}"))
96
122
  end
97
123
  end
98
124
 
@@ -102,7 +128,7 @@ require 'rake/gempackagetask'
102
128
  spec = Gem::Specification.new do |s|
103
129
  s.name = project
104
130
  s.rubyforge_project = project
105
- s.version = "0.5.0"
131
+ s.version = "0.5.1"
106
132
  s.author = "Greg Weber"
107
133
  s.email = "greg@gregweber.info"
108
134
  s.homepage = "http://quicktest.rubyfore.org/"
File without changes
@@ -1,7 +1,7 @@
1
1
  .....FFFFFFFF
2
2
 
3
3
  1)
4
- '#<Object:0xb78e4d30> should show class name in output' FAILED
4
+ '#<Object:0xb7914e7c> 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:99:in `__quicktest_run_tests__'
10
10
 
11
11
  2)
12
- '#<Object:0xb78e3f20> new_method_added should show name of added method' FAILED
12
+ '#<Object:0xb7913130> 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'
@@ -41,7 +41,7 @@ expected: /^'TestClass should show class name in output' FAILED$/,
41
41
  ../lib/quicktest.rb:99:in `__quicktest_run_tests__'
42
42
 
43
43
  6)
44
- '#<TestClass:0xb78de124> should show class name in output' FAILED
44
+ '#<TestClass:0xb790d1b8> should show class name in output' FAILED
45
45
  expected: /^'#<TestClass:0x[^>]+> should show class name in output' FAILED$/,
46
46
  got: nil (using =~)
47
47
  ./test.rb:107:in `quicktest'
@@ -49,7 +49,7 @@ expected: /^'#<TestClass:0x[^>]+> should show class name in output' FAILED$/,
49
49
  ../lib/quicktest.rb:99:in `__quicktest_run_tests__'
50
50
 
51
51
  7)
52
- '#<TestClass:0xb78dc4b4> new_method_added should show name of added method' FAILED
52
+ '#<TestClass:0xb790b548> new_method_added should show name of added method' FAILED
53
53
  expected: /^'#<TestClass:0x[^>]+> new_method_added should show name of added method' FAILED$/,
54
54
  got: nil (using =~)
55
55
  ./test.rb:117:in `quicktest'
@@ -64,6 +64,6 @@ expected: /^'TestClass new_singleton_method_added should show class name in outp
64
64
  ../lib/quicktest.rb:99:in `call'
65
65
  ../lib/quicktest.rb:99:in `__quicktest_run_tests__'
66
66
 
67
- Finished in 0.04979 seconds
67
+ Finished in 0.028634 seconds
68
68
 
69
69
  13 examples, 8 failures
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: quicktest
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.0
7
- date: 2008-03-09 00:00:00 -06:00
6
+ version: 0.5.1
7
+ date: 2008-03-10 00:00:00 -05:00
8
8
  summary: utility for inlining tests with the code tested
9
9
  require_paths:
10
10
  - lib
@@ -33,7 +33,7 @@ files:
33
33
  - ./doc
34
34
  - ./lib
35
35
  - ./pkg
36
- - ./test
36
+ - ./spec
37
37
  - ./README
38
38
  - ./rakefile
39
39
  - bin/quickspec
@@ -46,11 +46,12 @@ files:
46
46
  - doc/created.rid
47
47
  - doc/classes
48
48
  - lib/quicktest.rb
49
+ - pkg/quicktest-0.5.0.gem
49
50
  - pkg/quicktest-0.3.2.gem
50
51
  - pkg/quicktest-0.3.4.gem
51
52
  - pkg/quicktest-0.4.0.gem
52
- - test/test.rb
53
- - test/test_result.txt
53
+ - spec/test.rb
54
+ - spec/test_result.txt
54
55
  - README
55
56
  test_files: []
56
57