ae 1.0.0
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/HISTORY +12 -0
- data/LICENSE +677 -0
- data/MANIFEST +39 -0
- data/README +84 -0
- data/demo/01_overview.rdoc +97 -0
- data/demo/02_assertion.rdoc +1 -0
- data/demo/03_assert.rdoc +230 -0
- data/demo/04_subjunctive.rdoc +127 -0
- data/doc/qedoc/index.html +704 -0
- data/doc/qedoc/jquery.js +19 -0
- data/lib/ae.rb +7 -0
- data/lib/ae/assert.rb +57 -0
- data/lib/ae/assertion.rb +27 -0
- data/lib/ae/assertor.rb +104 -0
- data/lib/ae/core_ext.rb +202 -0
- data/lib/ae/subjunctive.rb +73 -0
- data/lib/ae/subjunctive/must.rb +48 -0
- data/lib/ae/subjunctive/should.rb +49 -0
- data/meta/authors +1 -0
- data/meta/contact +1 -0
- data/meta/created +1 -0
- data/meta/description +2 -0
- data/meta/homepage +1 -0
- data/meta/license +1 -0
- data/meta/package +1 -0
- data/meta/project +1 -0
- data/meta/released +1 -0
- data/meta/repository +1 -0
- data/meta/ruby +2 -0
- data/meta/summary +1 -0
- data/meta/title +1 -0
- data/meta/version +1 -0
- metadata +96 -0
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'ae/subjunctive'
|
2
|
+
|
3
|
+
module AE
|
4
|
+
|
5
|
+
# = Must
|
6
|
+
#
|
7
|
+
# "It is not enough to succeed. Others must fail."
|
8
|
+
# --Gore Vidal (1925 - )
|
9
|
+
#
|
10
|
+
# THIS IS AN OPTIONAL LIBRARY.
|
11
|
+
#
|
12
|
+
module Must
|
13
|
+
# The #must method is functionaly the same as #should.
|
14
|
+
#
|
15
|
+
# 4.must == 3 #=> Assertion Error
|
16
|
+
#
|
17
|
+
# 4.must do
|
18
|
+
# self == 4
|
19
|
+
# end
|
20
|
+
#
|
21
|
+
def must(*args, &block)
|
22
|
+
Assertor.new(self, :backtrace=>caller).be(*args, &block)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Designate a negated expectation via a *functor*.
|
26
|
+
# Read this as "must not".
|
27
|
+
#
|
28
|
+
# 4.must! == 4 #=> Assertion Error
|
29
|
+
#
|
30
|
+
def must!(*args, &block)
|
31
|
+
Assertor.new(self, :backtrace=>caller).not(*args, &block)
|
32
|
+
end
|
33
|
+
|
34
|
+
# Perhaps not literally the counter-term to *must* (rather *will*),
|
35
|
+
# it is close enough for our purposes and conveys the appropriate semantics.
|
36
|
+
alias_method :wont, :must!
|
37
|
+
|
38
|
+
# Alias for #must! method.
|
39
|
+
#alias_method :musnt , :must!
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
class ::Object #:nodoc:
|
45
|
+
include AE::Must
|
46
|
+
end
|
47
|
+
|
48
|
+
# Copyright (c) 2008,2009 Thomas Sawyer
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'ae/subjunctive'
|
2
|
+
|
3
|
+
module AE
|
4
|
+
|
5
|
+
# = Should
|
6
|
+
#
|
7
|
+
# "Always and never are two words you should always
|
8
|
+
# remember never to use."
|
9
|
+
# --Wendell Johnson
|
10
|
+
#
|
11
|
+
# THIS IS AN OPTIONAL LIBRARY.
|
12
|
+
#
|
13
|
+
module Should
|
14
|
+
# The #must method is functionaly the same as #should.
|
15
|
+
#
|
16
|
+
# 4.should == 3 #=> Assertion Error
|
17
|
+
#
|
18
|
+
# 4.should do
|
19
|
+
# self == 4
|
20
|
+
# end
|
21
|
+
#
|
22
|
+
def should(*args, &block)
|
23
|
+
Assertor.new(self, :backtrace=>caller).be(*args, &block)
|
24
|
+
end
|
25
|
+
|
26
|
+
# Designate a negated expectation via a *functor*.
|
27
|
+
# Read this as "must not".
|
28
|
+
#
|
29
|
+
# 4.should! == 4 #=> Assertion Error
|
30
|
+
#
|
31
|
+
def should!(*args, &block)
|
32
|
+
Assertor.new(self, :backtrace=>caller).not(*args, &block)
|
33
|
+
end
|
34
|
+
|
35
|
+
# Not quite the literally the counter-term to *should* (rather *shall*), but
|
36
|
+
# it is close enough for our purposes and conveys the appropriate semantics.
|
37
|
+
#alias_method :shant, :should!
|
38
|
+
|
39
|
+
# Alias for #should! method.
|
40
|
+
alias_method :shouldnt, :should!
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
class ::Object #:nodoc:
|
46
|
+
include AE::Should
|
47
|
+
end
|
48
|
+
|
49
|
+
# Copyright (c) 2008,2009 Thomas Sawyer
|
data/meta/authors
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Trans
|
data/meta/contact
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
trans <admin@tigerops.org>
|
data/meta/created
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2008-08-17 09:00:06
|
data/meta/description
ADDED
data/meta/homepage
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
http://ae.rubyforge.org
|
data/meta/license
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
LGPLv3
|
data/meta/package
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ae
|
data/meta/project
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
proutils
|
data/meta/released
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2009-09-03
|
data/meta/repository
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
git://github.com/proutils/ae.git
|
data/meta/ruby
ADDED
data/meta/summary
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Assertion Expressions
|
data/meta/title
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
AE
|
data/meta/version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.0
|
metadata
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ae
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- trans <admin@tigerops.org>
|
8
|
+
- Trans
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2009-09-03 00:00:00 -04:00
|
14
|
+
default_executable:
|
15
|
+
dependencies: []
|
16
|
+
|
17
|
+
description: |-
|
18
|
+
Assertive Expressive is an assertions library intended for reuse
|
19
|
+
by any TDD, BDD or the like system.
|
20
|
+
email: trans <admin@tigerops.org>
|
21
|
+
executables: []
|
22
|
+
|
23
|
+
extensions: []
|
24
|
+
|
25
|
+
extra_rdoc_files:
|
26
|
+
- README
|
27
|
+
- MANIFEST
|
28
|
+
- LICENSE
|
29
|
+
- HISTORY
|
30
|
+
files:
|
31
|
+
- demo/01_overview.rdoc
|
32
|
+
- demo/02_assertion.rdoc
|
33
|
+
- demo/03_assert.rdoc
|
34
|
+
- demo/04_subjunctive.rdoc
|
35
|
+
- doc/qedoc/index.html
|
36
|
+
- doc/qedoc/jquery.js
|
37
|
+
- lib/ae/assert.rb
|
38
|
+
- lib/ae/assertion.rb
|
39
|
+
- lib/ae/assertor.rb
|
40
|
+
- lib/ae/core_ext.rb
|
41
|
+
- lib/ae/subjunctive/must.rb
|
42
|
+
- lib/ae/subjunctive/should.rb
|
43
|
+
- lib/ae/subjunctive.rb
|
44
|
+
- lib/ae.rb
|
45
|
+
- meta/authors
|
46
|
+
- meta/contact
|
47
|
+
- meta/created
|
48
|
+
- meta/description
|
49
|
+
- meta/homepage
|
50
|
+
- meta/license
|
51
|
+
- meta/package
|
52
|
+
- meta/project
|
53
|
+
- meta/released
|
54
|
+
- meta/repository
|
55
|
+
- meta/ruby
|
56
|
+
- meta/summary
|
57
|
+
- meta/title
|
58
|
+
- meta/version
|
59
|
+
- LICENSE
|
60
|
+
- README
|
61
|
+
- HISTORY
|
62
|
+
- MANIFEST
|
63
|
+
has_rdoc: true
|
64
|
+
homepage: http://ae.rubyforge.org
|
65
|
+
licenses: []
|
66
|
+
|
67
|
+
post_install_message:
|
68
|
+
rdoc_options:
|
69
|
+
- --inline-source
|
70
|
+
- --title
|
71
|
+
- ae api
|
72
|
+
- --main
|
73
|
+
- README
|
74
|
+
require_paths:
|
75
|
+
- lib
|
76
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: "0"
|
81
|
+
version:
|
82
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: "0"
|
87
|
+
version:
|
88
|
+
requirements: []
|
89
|
+
|
90
|
+
rubyforge_project: ae
|
91
|
+
rubygems_version: 1.3.5
|
92
|
+
signing_key:
|
93
|
+
specification_version: 3
|
94
|
+
summary: Assertion Expressions
|
95
|
+
test_files: []
|
96
|
+
|