ae 1.7.4 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.ruby +38 -39
- data/.yardopts +7 -0
- data/HISTORY.rdoc +31 -16
- data/NOTICE.rdoc +33 -15
- data/README.rdoc +14 -19
- data/lib/ae.rb +12 -33
- data/lib/ae.yml +38 -39
- data/lib/ae/adapters/minitest.rb +25 -15
- data/lib/ae/adapters/testunit.rb +1 -1
- data/lib/ae/assert.rb +20 -9
- data/lib/ae/assertion.rb +8 -5
- data/lib/ae/assertor.rb +127 -68
- data/lib/ae/basic_object.rb +0 -1
- data/lib/ae/check.rb +138 -10
- data/lib/ae/expect.rb +3 -6
- data/lib/ae/legacy.rb +84 -8
- data/lib/ae/must.rb +20 -12
- data/lib/ae/pry.rb +9 -8
- data/lib/ae/should.rb +14 -9
- data/lib/ae/subjunctive.rb +5 -6
- data/lib/ae/version.rb +3 -1
- data/qed/03_assert.rdoc +12 -6
- metadata +63 -69
- data/APACHE2.txt +0 -206
- data/lib/ae/ok.rb +0 -38
data/lib/ae/ok.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# TODO: This needs to be imporved. See KO project for
|
2
|
-
# better implementation.
|
3
|
-
|
4
|
-
module AE
|
5
|
-
|
6
|
-
#
|
7
|
-
module Okay
|
8
|
-
|
9
|
-
#
|
10
|
-
def check(msg=nil, &block)
|
11
|
-
if block.arity == 0
|
12
|
-
@__c__ = nil
|
13
|
-
assert(block.call, msg)
|
14
|
-
else
|
15
|
-
@__c__ = [block, msg]
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
#
|
20
|
-
def ok(*args)
|
21
|
-
block, msg = *@__c__
|
22
|
-
assert(block.call(*args), msg)
|
23
|
-
end
|
24
|
-
|
25
|
-
#
|
26
|
-
def no(*args)
|
27
|
-
block, msg = *@__c__
|
28
|
-
refute(block.call(*args), msg)
|
29
|
-
end
|
30
|
-
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
34
|
-
|
35
|
-
class ::Object #:nodoc:
|
36
|
-
include AE::Okay
|
37
|
-
end
|
38
|
-
|