mofo 0.1.1 → 0.1.2
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/CHANGELOG +4 -0
- data/{tests → test}/fixtures/bob.html +0 -0
- data/{tests → test}/fixtures/chowhound.html +0 -0
- data/{tests → test}/fixtures/corkd.html +0 -0
- data/{tests → test}/fixtures/events.html +0 -0
- data/{tests → test}/fixtures/fake.html +0 -0
- data/{tests → test}/fixtures/fauxtank.html +0 -0
- data/{tests → test}/fixtures/hatom.html +0 -0
- data/{tests → test}/fixtures/simple.html +0 -0
- data/{tests → test}/fixtures/upcoming.html +0 -0
- data/{tests → test}/format_test.rb +1 -1
- data/{tests → test}/hatom_test.rb +1 -1
- data/{tests → test}/test_helper.rb +1 -1
- data/{tests → test}/xoxo_test.rb +1 -1
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/ChangeLog +57 -0
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/README +85 -2
- data/vendor/testspec-0.3.0/ROADMAP +1 -0
- data/vendor/testspec-0.3.0/Rakefile +151 -0
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/SPECS +11 -4
- data/vendor/testspec-0.3.0/TODO +2 -0
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/bin/specrb +3 -2
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/classes/Kernel.html +35 -0
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/classes/Object.html +12 -11
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/classes/Test/Spec.html +3 -7
- data/vendor/testspec-0.3.0/doc/classes/Test/Spec/CustomShould.html +236 -0
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/classes/Test/Spec/DefinitionError.html +0 -0
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/classes/Test/Spec/Should.html +368 -347
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/classes/Test/Spec/ShouldNot.html +195 -119
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/classes/Test/Spec/TestCase.html +29 -29
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/classes/Test/Spec/TestCase/ClassMethods.html +83 -55
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/classes/Test/Spec/TestCase/InstanceMethods.html +35 -35
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/classes/Test/Unit/UI/RDox/TestRunner.html +24 -24
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/classes/Test/Unit/UI/SpecDox/TestRunner.html +185 -177
- data/vendor/testspec-0.3.0/doc/created.rid +1 -0
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/files/README.html +111 -4
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/files/ROADMAP.html +2 -5
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/files/SPECS.html +26 -5
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/files/lib/test/spec/dox_rb.html +1 -1
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/files/lib/test/spec/rdox_rb.html +1 -1
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/files/lib/test/spec/should-output_rb.html +2 -1
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/files/lib/test/spec_rb.html +2 -2
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/fr_class_index.html +1 -0
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/fr_file_index.html +0 -0
- data/vendor/testspec-0.3.0/doc/fr_method_index.html +102 -0
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/index.html +0 -0
- data/vendor/{testspec-0.2.0/rdoc → testspec-0.3.0/doc}/rdoc-style.css +0 -0
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/examples/stack.rb +0 -0
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/examples/stack_spec.rb +0 -0
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/lib/test/spec.rb +167 -43
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/lib/test/spec/dox.rb +16 -8
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/lib/test/spec/rdox.rb +0 -0
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/lib/test/spec/should-output.rb +3 -2
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/test/spec_dox.rb +0 -0
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/test/spec_flexmock.rb +0 -0
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/test/spec_mocha.rb +0 -0
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/test/spec_nestedcontexts.rb +0 -0
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/test/spec_should-output.rb +1 -1
- data/vendor/testspec-0.3.0/test/spec_testspec.rb +522 -0
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/test/spec_testspec_order.rb +0 -0
- data/vendor/{testspec-0.2.0 → testspec-0.3.0}/test/test_testunit.rb +0 -0
- metadata +82 -81
- data/vendor/testspec-0.2.0/ROADMAP +0 -3
- data/vendor/testspec-0.2.0/Rakefile +0 -86
- data/vendor/testspec-0.2.0/TODO +0 -1
- data/vendor/testspec-0.2.0/rdoc/created.rid +0 -1
- data/vendor/testspec-0.2.0/rdoc/fr_method_index.html +0 -95
- data/vendor/testspec-0.2.0/test/spec_testspec.rb +0 -311
data/CHANGELOG
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/{tests → test}/xoxo_test.rb
RENAMED
|
@@ -1,3 +1,60 @@
|
|
|
1
|
+
Wed Jan 24 12:07:09 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
2
|
+
tagged 0.3
|
|
3
|
+
|
|
4
|
+
Wed Jan 24 12:06:23 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
5
|
+
* set VERSION 0.3
|
|
6
|
+
|
|
7
|
+
Wed Jan 24 12:05:28 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
8
|
+
* Last minute fixes
|
|
9
|
+
|
|
10
|
+
Wed Jan 24 11:51:39 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
11
|
+
* Update docs
|
|
12
|
+
|
|
13
|
+
Wed Jan 24 11:50:14 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
14
|
+
* Improve rdoc
|
|
15
|
+
|
|
16
|
+
Wed Jan 24 11:40:37 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
17
|
+
* Rename met_by? to matches? to conform latest RSpec
|
|
18
|
+
|
|
19
|
+
Tue Jan 16 18:57:27 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
20
|
+
* Improve coverage
|
|
21
|
+
|
|
22
|
+
Tue Jan 16 18:56:48 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
23
|
+
* Add hoe
|
|
24
|
+
|
|
25
|
+
Tue Jan 16 17:11:05 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
26
|
+
* Some docfixes
|
|
27
|
+
|
|
28
|
+
Tue Jan 16 17:07:55 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
29
|
+
* Make test suite use custom shoulds, fix some details
|
|
30
|
+
|
|
31
|
+
Tue Jan 16 16:29:12 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
32
|
+
* Add custom shoulds
|
|
33
|
+
|
|
34
|
+
Fri Jan 5 15:25:35 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
35
|
+
* Update copyright messages for 2007
|
|
36
|
+
|
|
37
|
+
Fri Jan 5 12:24:46 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
38
|
+
* Add should.not.satisfy
|
|
39
|
+
|
|
40
|
+
Thu Jan 4 19:09:46 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
41
|
+
* Add disabling with xspecify
|
|
42
|
+
|
|
43
|
+
Thu Jan 4 19:03:04 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
44
|
+
* Add #messaging/#blaming
|
|
45
|
+
|
|
46
|
+
Thu Jan 4 17:34:00 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
47
|
+
* specrb -a now includes -Ilib by default for easier out-of-the-box testing
|
|
48
|
+
|
|
49
|
+
Thu Jan 4 17:30:49 CET 2007 Christian Neukirchen <chneukirchen@gmail.com>
|
|
50
|
+
* Deprecation of be_close, be_an_instance_of, be_a_kind_of, and be_nil
|
|
51
|
+
|
|
52
|
+
Tue Nov 14 13:21:38 CET 2006 Christian Neukirchen <chneukirchen@gmail.com>
|
|
53
|
+
* Unshift the LOAD_PATH to recreate a more -I-like behavior
|
|
54
|
+
|
|
55
|
+
Mon Nov 13 23:03:41 CET 2006 Christian Neukirchen <chneukirchen@gmail.com>
|
|
56
|
+
* Use Dir.tmpdir for temporary file paths
|
|
57
|
+
|
|
1
58
|
Wed Oct 18 18:21:06 CEST 2006 Christian Neukirchen <chneukirchen@gmail.com>
|
|
2
59
|
tagged 0.2
|
|
3
60
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
= test/spec, a BDD interface for Test::Unit
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2006 Christian Neukirchen <mailto:chneukirchen@gmail.com>
|
|
3
|
+
Copyright (C) 2006, 2007 Christian Neukirchen <mailto:chneukirchen@gmail.com>
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
== What is test/spec?
|
|
@@ -95,6 +95,56 @@ If you write an useful general-purpose assertion, I'd like to hear of
|
|
|
95
95
|
it and may add it to the test/spec distribution.
|
|
96
96
|
|
|
97
97
|
|
|
98
|
+
== Messaging/Blaming
|
|
99
|
+
|
|
100
|
+
With more complex assertions, it may be helpful to provide a message
|
|
101
|
+
to show if the assertion has failed. This can be done with the
|
|
102
|
+
Should#blaming or Should#messaging methods:
|
|
103
|
+
|
|
104
|
+
RUBY_VERSION.should.messaging("Ruby too old.").be > "1.8.4"
|
|
105
|
+
|
|
106
|
+
(1 + 1).should.blaming("weird math").not.equal 11
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
== Custom shoulds ("Matchers")
|
|
110
|
+
|
|
111
|
+
To capture recurring patterns in parts of your specifications, you can
|
|
112
|
+
define custom "shoulds" (RSpec calls them "matchers") in your
|
|
113
|
+
contexts, or include modules of them:
|
|
114
|
+
|
|
115
|
+
context "Numbers"
|
|
116
|
+
class EqualString < Test::Spec::CustomShould
|
|
117
|
+
def matches?(other)
|
|
118
|
+
object == other.to_s
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
def equal_string(str)
|
|
123
|
+
EqualString.new(str)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
specify "should have to_s"
|
|
127
|
+
42.should equal_string("42")
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
Alternatively, your implementation can define
|
|
132
|
+
CustomShould#assumptions, where you can use test/spec assertions
|
|
133
|
+
instead of Boolean predicates:
|
|
134
|
+
|
|
135
|
+
class EqualString < Test::Spec::CustomShould
|
|
136
|
+
def assumptions(other)
|
|
137
|
+
object.should.equal other.to_s
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
A CustomShould by default takes one argument, which is placed in
|
|
142
|
+
self.object for your convenience.
|
|
143
|
+
|
|
144
|
+
You can CustomShould#failure_message to provide a better error
|
|
145
|
+
message.
|
|
146
|
+
|
|
147
|
+
|
|
98
148
|
== SpecDox and RDox
|
|
99
149
|
|
|
100
150
|
test/spec adds two additional test runners to Test::Unit, based on the
|
|
@@ -130,6 +180,13 @@ SpecDox and RDox work for Test::Unit too:
|
|
|
130
180
|
3 specifications (30 requirements), 0 failures
|
|
131
181
|
|
|
132
182
|
|
|
183
|
+
== Disabled specifications
|
|
184
|
+
|
|
185
|
+
Akin to the usual Test::Unit practice, tests quickly can be disabled
|
|
186
|
+
by replacing +specify+ with +xspecify+. test/spec will count the
|
|
187
|
+
disabled tests when you run it with SpecDox or RDox.
|
|
188
|
+
|
|
189
|
+
|
|
133
190
|
== specrb
|
|
134
191
|
|
|
135
192
|
Since version 0.2, test/spec features a standalone test runner called
|
|
@@ -151,6 +208,18 @@ plain Test::Unit suites, too.
|
|
|
151
208
|
Run <tt>specrb --help</tt> for the usage.
|
|
152
209
|
|
|
153
210
|
|
|
211
|
+
== Installing with RubyGems
|
|
212
|
+
|
|
213
|
+
Since version 0.3, a Gem of test/spec is available. You can install with:
|
|
214
|
+
|
|
215
|
+
gem install test-spec
|
|
216
|
+
|
|
217
|
+
I also provide a local mirror of the gems (and development snapshots)
|
|
218
|
+
at my site:
|
|
219
|
+
|
|
220
|
+
gem install test-spec --source http://chneukirchen.org/releases/gems
|
|
221
|
+
|
|
222
|
+
|
|
154
223
|
== History
|
|
155
224
|
|
|
156
225
|
* September 29th, 2006: First public release 0.1.
|
|
@@ -163,6 +232,18 @@ Run <tt>specrb --help</tt> for the usage.
|
|
|
163
232
|
* Nested contexts
|
|
164
233
|
* Standalone test/spec runner, specrb
|
|
165
234
|
|
|
235
|
+
* January 24th, 2007: Third public release 0.3.
|
|
236
|
+
* should.be_close, should.be_an_instance_of, should.be_a_kind_of,
|
|
237
|
+
and should.be_nil have been deprecated. Use the dot-variants of
|
|
238
|
+
them. These assertions will be removed in 1.0.
|
|
239
|
+
* specrb -a now includes -Ilib by default for easier out-of-the-box
|
|
240
|
+
testing.
|
|
241
|
+
* Added custom shoulds.
|
|
242
|
+
* Added messaging/blaming.
|
|
243
|
+
* Added disabling of specifications.
|
|
244
|
+
* Small bug fixes.
|
|
245
|
+
* Gem available.
|
|
246
|
+
|
|
166
247
|
|
|
167
248
|
== Contact
|
|
168
249
|
|
|
@@ -176,6 +257,8 @@ http://chneukirchen.org/repos/testspec
|
|
|
176
257
|
== Thanks to
|
|
177
258
|
|
|
178
259
|
* Eero Saynatkari for writing <tt>should.output</tt>.
|
|
260
|
+
* Jean-Michel Garnier for packaging the first gem.
|
|
261
|
+
* Mikko Lehtonen for testing the gem.
|
|
179
262
|
* Thomas Fuchs for script.aculo.us BDD testing which convinced me.
|
|
180
263
|
* Dave Astels for BDD.
|
|
181
264
|
* The RSpec team for API inspiration.
|
|
@@ -184,7 +267,7 @@ http://chneukirchen.org/repos/testspec
|
|
|
184
267
|
|
|
185
268
|
== Copying
|
|
186
269
|
|
|
187
|
-
Copyright (C) 2006 Christian Neukirchen <http://purl.org/net/chneukirchen>
|
|
270
|
+
Copyright (C) 2006, 2007 Christian Neukirchen <http://purl.org/net/chneukirchen>
|
|
188
271
|
|
|
189
272
|
test/spec is licensed under the same terms as Ruby itself.
|
|
190
273
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Version 1.0 (February 2006):: first stable release.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Rakefile for testspec. -*-ruby-*-
|
|
2
|
+
require 'rake/rdoctask'
|
|
3
|
+
require 'rake/testtask'
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
desc "Run all the tests"
|
|
7
|
+
task :default => [:test]
|
|
8
|
+
|
|
9
|
+
desc "Do predistribution stuff"
|
|
10
|
+
task :predist => [:chmod, :changelog, :rdoc]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
desc "Make an archive as .tar.gz"
|
|
14
|
+
task :dist => :test do
|
|
15
|
+
system "export DARCS_REPO=#{File.expand_path "."}; " +
|
|
16
|
+
"darcs dist -d test-spec#{get_darcs_tree_version}"
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Helper to retrieve the "revision number" of the darcs tree.
|
|
20
|
+
def get_darcs_tree_version
|
|
21
|
+
return "" unless File.directory? "_darcs"
|
|
22
|
+
|
|
23
|
+
changes = `darcs changes`
|
|
24
|
+
count = 0
|
|
25
|
+
tag = "0.0"
|
|
26
|
+
|
|
27
|
+
changes.each("\n\n") { |change|
|
|
28
|
+
head, title, desc = change.split("\n", 3)
|
|
29
|
+
|
|
30
|
+
if title =~ /^ \*/
|
|
31
|
+
# Normal change.
|
|
32
|
+
count += 1
|
|
33
|
+
elsif title =~ /tagged (.*)/
|
|
34
|
+
# Tag. We look for these.
|
|
35
|
+
tag = $1
|
|
36
|
+
break
|
|
37
|
+
else
|
|
38
|
+
warn "Unparsable change: #{change}"
|
|
39
|
+
end
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
"-" + tag + "." + count.to_s
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
desc "Make binaries executable"
|
|
46
|
+
task :chmod do
|
|
47
|
+
Dir["bin/*"].each { |binary| File.chmod(0775, binary) }
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
desc "Generate a ChangeLog"
|
|
51
|
+
task :changelog do
|
|
52
|
+
system "darcs changes --repo=#{ENV["DARCS_REPO"] || "."} >ChangeLog"
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
desc "Generate RDox"
|
|
57
|
+
task "SPECS" do
|
|
58
|
+
ruby "bin/specrb -Ilib:test -a --rdox >SPECS"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
begin
|
|
63
|
+
# To generate the gem, run "rake package"
|
|
64
|
+
|
|
65
|
+
$" << "sources" if defined? FromSrc
|
|
66
|
+
require 'rubygems'
|
|
67
|
+
|
|
68
|
+
require 'rake'
|
|
69
|
+
require 'rake/clean'
|
|
70
|
+
require 'rake/packagetask'
|
|
71
|
+
require 'rake/gempackagetask'
|
|
72
|
+
require 'rake/contrib/rubyforgepublisher'
|
|
73
|
+
require 'fileutils'
|
|
74
|
+
require 'hoe'
|
|
75
|
+
rescue LoadError
|
|
76
|
+
# Too bad.
|
|
77
|
+
|
|
78
|
+
desc "Run all the tests"
|
|
79
|
+
task :test => :chmod do
|
|
80
|
+
ruby "bin/specrb -Ilib:test -w #{ENV['TEST'] || '-a'} #{ENV['TESTOPTS']}"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
else
|
|
84
|
+
|
|
85
|
+
RDOC_OPTS = ['--title', "test/spec documentation",
|
|
86
|
+
"--opname", "index.html",
|
|
87
|
+
"--line-numbers",
|
|
88
|
+
"--main", "README",
|
|
89
|
+
"--inline-source"]
|
|
90
|
+
|
|
91
|
+
# Generate all the Rake tasks
|
|
92
|
+
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
|
93
|
+
hoe = Hoe.new("test-spec", get_darcs_tree_version[1..-1]) do |p|
|
|
94
|
+
p.author = "Christian Neukirchen"
|
|
95
|
+
p.description = "a Behaviour Driven Development interface for Test::Unit"
|
|
96
|
+
p.email = "chneukirchen@gmail.com"
|
|
97
|
+
p.summary = <<EOF
|
|
98
|
+
test/spec layers an RSpec-inspired interface on top of Test::Unit, so
|
|
99
|
+
you can mix TDD and BDD (Behavior-Driven Development).
|
|
100
|
+
|
|
101
|
+
test/spec is a clean-room implementation that maps most kinds of
|
|
102
|
+
Test::Unit assertions to a `should'-like syntax.
|
|
103
|
+
EOF
|
|
104
|
+
p.url = "http://test-spec.rubyforge.org"
|
|
105
|
+
p.test_globs = ["test/**/{test,spec}_*.rb"]
|
|
106
|
+
p.clean_globs = []
|
|
107
|
+
p.extra_deps = ['flexmock','>= 0.4.1'],['mocha','>= 0.3.2']
|
|
108
|
+
p.need_tar = false # we do that ourselves
|
|
109
|
+
p.changes = File.read("README")[/^== History\n(.*?)^==/m, 1].
|
|
110
|
+
split(/\n{2,}/).last
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
task :package => ["Manifest.txt", :dist]
|
|
114
|
+
|
|
115
|
+
# Yes, this is ridiculous.
|
|
116
|
+
hoe.spec.dependencies.delete_if { |dep| dep.name == "hoe" }
|
|
117
|
+
Rake.application.instance_variable_get(:@tasks).delete :docs
|
|
118
|
+
Rake.application.instance_variable_get(:@tasks).delete "doc/index.html"
|
|
119
|
+
task :docs => :rdoc
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
desc "Generate RDoc documentation"
|
|
124
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
|
125
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
|
126
|
+
rdoc.rdoc_dir = "doc"
|
|
127
|
+
rdoc.rdoc_files.include 'README'
|
|
128
|
+
rdoc.rdoc_files.include 'ROADMAP'
|
|
129
|
+
rdoc.rdoc_files.include 'SPECS'
|
|
130
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
131
|
+
end
|
|
132
|
+
task :rdoc => "SPECS"
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
desc "Generate Manifest.txt"
|
|
136
|
+
task "Manifest.txt" do
|
|
137
|
+
system "darcs query manifest | sed 's:^./::' >Manifest.txt"
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
begin
|
|
141
|
+
require 'rcov/rcovtask'
|
|
142
|
+
|
|
143
|
+
Rcov::RcovTask.new do |t|
|
|
144
|
+
t.test_files = FileList['test/{spec,test}_*.rb'] + ['--', '-rs'] # evil
|
|
145
|
+
t.verbose = true # uncomment to see the executed command
|
|
146
|
+
t.rcov_opts = ["--text-report",
|
|
147
|
+
"--include-file", "^lib,^test",
|
|
148
|
+
"--exclude-only", "^/usr,^/home/.*/src"]
|
|
149
|
+
end
|
|
150
|
+
rescue LoadError
|
|
151
|
+
end
|
|
@@ -63,13 +63,14 @@
|
|
|
63
63
|
* has should.equal
|
|
64
64
|
* has should.raise
|
|
65
65
|
* should.raise should return the exception
|
|
66
|
-
* has should.
|
|
67
|
-
* has should.
|
|
66
|
+
* has should.be.an.instance_of
|
|
67
|
+
* has should.be.nil
|
|
68
68
|
* has should.include
|
|
69
|
-
* has should.
|
|
69
|
+
* has should.be.a.kind_of
|
|
70
70
|
* has should.match
|
|
71
71
|
* has should.be
|
|
72
72
|
* has should.not.raise
|
|
73
|
+
* has should.not.satisfy
|
|
73
74
|
* has should.not.be
|
|
74
75
|
* has should.not.equal
|
|
75
76
|
* has should.not.match
|
|
@@ -81,6 +82,12 @@
|
|
|
81
82
|
* has should.<predicate>
|
|
82
83
|
* has should <operator> (>, >=, <, <=, ===)
|
|
83
84
|
* is robust against careless users
|
|
85
|
+
* should detect warnings
|
|
86
|
+
* should message/blame faults
|
|
87
|
+
* should allow for custom shoulds
|
|
88
|
+
* disabled specification (disabled)
|
|
89
|
+
=== more disabled
|
|
90
|
+
* this is intentional (disabled)
|
|
84
91
|
|
|
85
92
|
== setup/teardown
|
|
86
93
|
* run in the right order
|
|
@@ -98,4 +105,4 @@
|
|
|
98
105
|
== Context Last
|
|
99
106
|
* runs last
|
|
100
107
|
|
|
101
|
-
|
|
108
|
+
76 specifications, 2 disabled (414 requirements), 0 failures
|
|
@@ -27,7 +27,7 @@ opts = OptionParser.new("", 24, ' ') { |opts|
|
|
|
27
27
|
|
|
28
28
|
opts.on("-I", "--include PATH",
|
|
29
29
|
"specify $LOAD_PATH (may be used more than once)") { |path|
|
|
30
|
-
$LOAD_PATH.
|
|
30
|
+
$LOAD_PATH.unshift *path.split(":")
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
opts.on("-r", "--require LIBRARY",
|
|
@@ -45,7 +45,8 @@ opts = OptionParser.new("", 24, ' ') { |opts|
|
|
|
45
45
|
testrbargv << "--runner=rdox"
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
opts.on("-a", "--automatic", "gather tests from ./test/") {
|
|
48
|
+
opts.on("-a", "--automatic", "gather tests from ./test/, include ./lib/") {
|
|
49
|
+
$LOAD_PATH.unshift "lib" if File.directory? "lib"
|
|
49
50
|
automatic = true
|
|
50
51
|
}
|
|
51
52
|
|