quicktest 0.5.2 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README +6 -0
- data/doc/created.rid +1 -1
- data/rakefile +27 -23
- data/spec/test_result.txt +5 -5
- metadata +8 -8
- data/pkg/quicktest-0.3.2.gem +0 -0
- data/pkg/quicktest-0.3.4.gem +0 -0
- data/pkg/quicktest-0.4.0.gem +0 -0
- data/pkg/quicktest-0.5.0.gem +0 -0
- data/pkg/quicktest-0.5.1.gem +0 -0
data/README
CHANGED
@@ -46,10 +46,16 @@ Running quicktest on the source of this README file outputs the following:
|
|
46
46
|
2 examples, 1 failure
|
47
47
|
|
48
48
|
== Usage
|
49
|
+
=== Install
|
50
|
+
|
51
|
+
gem install quicktest
|
52
|
+
|
53
|
+
=== test code
|
49
54
|
To test a method, place another method called 'quicktest' immediately after it
|
50
55
|
the quicktest method has one OPTIONAL argument:
|
51
56
|
- a method object for the method under test
|
52
57
|
|
58
|
+
=== execution
|
53
59
|
run with
|
54
60
|
|
55
61
|
spec -r quicktest file_to_test
|
data/doc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Tue, 11 Mar 2008
|
1
|
+
Tue, 11 Mar 2008 15:27:43 -0500
|
data/rakefile
CHANGED
@@ -30,26 +30,6 @@ namespace :test do
|
|
30
30
|
end
|
31
31
|
end
|
32
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'
|
49
|
-
end
|
50
|
-
end
|
51
|
-
=end
|
52
|
-
|
53
33
|
class IO
|
54
34
|
def self.write( file, str )
|
55
35
|
self.open( file, 'w' ) { |fh| fh.print str }
|
@@ -114,12 +94,15 @@ namespace :readme do
|
|
114
94
|
end
|
115
95
|
|
116
96
|
desc "release a new gem to rubyforge"
|
117
|
-
task :release => [:test,:rdoc,:website,:package] do
|
97
|
+
task :release => [:test,:record,:rdoc,:website,:package] do
|
118
98
|
Dir.chdir('pkg') do
|
119
99
|
release = Dir['*.gem'].sort_by {|file| File.mtime(file)}.last
|
120
100
|
release =~ /^[^-]+-([.0-9]+).gem$/
|
121
101
|
(puts (run "rubyforge login && rubyforge add_release #{project} #{project} #$1 #{release}"))
|
122
102
|
end
|
103
|
+
Dir.chdir('doc') do
|
104
|
+
run "scp -r ./ gregwebs@rubyforge.org:/var/www/gforge-projects/#{project}"
|
105
|
+
end
|
123
106
|
end
|
124
107
|
|
125
108
|
desc "update website"
|
@@ -130,24 +113,45 @@ file :website => ['README','rakefile'] do
|
|
130
113
|
end
|
131
114
|
end
|
132
115
|
|
116
|
+
desc 'git add and push'
|
117
|
+
task :record do
|
118
|
+
unless `git diff`.chomp.empty?
|
119
|
+
ARGV.clear
|
120
|
+
puts "enter commit message"
|
121
|
+
(puts (run "git commit -a -m #{Kernel.gets}"))
|
122
|
+
puts "committed! now pushing.. "
|
123
|
+
(puts (run 'git push origin master'))
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
133
127
|
require 'rubygems'
|
134
128
|
require 'rake/gempackagetask'
|
135
129
|
|
136
130
|
spec = Gem::Specification.new do |s|
|
137
131
|
s.name = project
|
138
132
|
s.rubyforge_project = project
|
139
|
-
s.version = "0.5.
|
133
|
+
s.version = "0.5.6"
|
140
134
|
s.author = "Greg Weber"
|
141
135
|
s.email = "greg@gregweber.info"
|
142
136
|
s.homepage = "http://quicktest.rubyfore.org/"
|
143
137
|
s.platform = Gem::Platform::RUBY
|
144
138
|
s.summary = "utility for inlining tests with the code tested"
|
145
139
|
s.executables = ['quickspec']
|
146
|
-
s.files =
|
140
|
+
s.files = FileList.new('./**', '*/**') do |fl|
|
141
|
+
fl.exclude('pkg','pkg/*','tmp','tmp/*')
|
142
|
+
end
|
147
143
|
s.require_path = "lib"
|
148
144
|
s.has_rdoc = true
|
149
145
|
s.extra_rdoc_files = ["README"]
|
150
146
|
s.add_dependency('rspec', '>= 1.0.0')
|
147
|
+
s.post_install_message = <<-EOS
|
148
|
+
|
149
|
+
spec and quickspec are ruby executable scripts, whose directory location must be in your PATH environment variable (or you must invoke the with the full file path).
|
150
|
+
|
151
|
+
run tests with
|
152
|
+
quickspec [file1 file2 ...]
|
153
|
+
|
154
|
+
EOS
|
151
155
|
end
|
152
156
|
|
153
157
|
Rake::GemPackageTask.new(spec) do |pkg|
|
data/spec/test_result.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.....FFFFFFFF
|
2
2
|
|
3
3
|
1)
|
4
|
-
'#<Object:
|
4
|
+
'#<Object:0xb781e3ec> 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:
|
12
|
+
'#<Object:0xb781d244> 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:
|
44
|
+
'#<TestClass:0xb78168f4> 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:
|
52
|
+
'#<TestClass:0xb78155f8> 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.
|
67
|
+
Finished in 0.029012 seconds
|
68
68
|
|
69
69
|
13 examples, 8 failures
|
metadata
CHANGED
@@ -3,7 +3,7 @@ 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.
|
6
|
+
version: 0.5.6
|
7
7
|
date: 2008-03-11 00:00:00 -05:00
|
8
8
|
summary: utility for inlining tests with the code tested
|
9
9
|
require_paths:
|
@@ -25,14 +25,19 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
25
25
|
platform: ruby
|
26
26
|
signing_key:
|
27
27
|
cert_chain:
|
28
|
-
post_install_message:
|
28
|
+
post_install_message: |+
|
29
|
+
|
30
|
+
spec and quickspec are ruby executable scripts, whose directory location must be in your PATH environment variable (or you must invoke the with the full file path).
|
31
|
+
|
32
|
+
run tests with
|
33
|
+
quickspec [file1 file2 ...]
|
34
|
+
|
29
35
|
authors:
|
30
36
|
- Greg Weber
|
31
37
|
files:
|
32
38
|
- ./bin
|
33
39
|
- ./doc
|
34
40
|
- ./lib
|
35
|
-
- ./pkg
|
36
41
|
- ./spec
|
37
42
|
- ./README
|
38
43
|
- ./rakefile
|
@@ -46,11 +51,6 @@ files:
|
|
46
51
|
- doc/created.rid
|
47
52
|
- doc/classes
|
48
53
|
- lib/quicktest.rb
|
49
|
-
- pkg/quicktest-0.5.0.gem
|
50
|
-
- pkg/quicktest-0.5.1.gem
|
51
|
-
- pkg/quicktest-0.3.2.gem
|
52
|
-
- pkg/quicktest-0.3.4.gem
|
53
|
-
- pkg/quicktest-0.4.0.gem
|
54
54
|
- spec/test.rb
|
55
55
|
- spec/test_result.txt
|
56
56
|
- README
|
data/pkg/quicktest-0.3.2.gem
DELETED
Binary file
|
data/pkg/quicktest-0.3.4.gem
DELETED
Binary file
|
data/pkg/quicktest-0.4.0.gem
DELETED
Binary file
|
data/pkg/quicktest-0.5.0.gem
DELETED
Binary file
|
data/pkg/quicktest-0.5.1.gem
DELETED
Binary file
|