qed 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{LICENSE → COPYING} +2 -2
- data/MANIFEST +2 -16
- data/README.rdoc +58 -21
- data/bin/qed +13 -13
- data/demo/01_spec.qed +6 -3
- data/doc/qedoc/index.html +13 -10
- data/lib/qed.rb +4 -3
- data/lib/qed/document.rb +9 -10
- data/lib/qed/{utilities/extract.rb → extract.rb} +0 -0
- data/lib/qed/script.rb +7 -1
- data/meta/requires +2 -0
- data/meta/version +1 -1
- metadata +25 -15
- data/lib/qed/assertion.rb +0 -23
- data/lib/qed/doubles/mock.rb +0 -94
- data/lib/qed/doubles/spy.rb +0 -191
- data/lib/qed/doubles/stub.rb +0 -94
- data/lib/qed/expectation.rb +0 -60
- data/lib/qed/grammar/assert.rb +0 -104
- data/lib/qed/grammar/expect.rb +0 -121
- data/lib/qed/grammar/legacy/assert.rb +0 -291
- data/lib/qed/grammar/should.rb +0 -52
- data/lib/qed/utilities/monitor.rb +0 -23
data/lib/qed/grammar/should.rb
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
module QED
|
2
|
-
|
3
|
-
require 'qed/expectation'
|
4
|
-
|
5
|
-
module Grammar
|
6
|
-
|
7
|
-
# = Should Nomenclature
|
8
|
-
#
|
9
|
-
# The term *should* has become the defacto standard for
|
10
|
-
# BDD assertions, so Quarry supports this nomenclature.
|
11
|
-
#
|
12
|
-
module Should
|
13
|
-
|
14
|
-
# Same as #expect but only as a functor.
|
15
|
-
#
|
16
|
-
# 4.should == 3 #=> Expectation Error
|
17
|
-
#
|
18
|
-
def should
|
19
|
-
return Expectation.new(self, :backtrace=>caller)
|
20
|
-
end
|
21
|
-
|
22
|
-
# Designate a negated expectation via a *functor*.
|
23
|
-
# Read this as "should not".
|
24
|
-
#
|
25
|
-
# 4.should! == 4 #=> Expectation Error
|
26
|
-
#
|
27
|
-
# See also #expect!
|
28
|
-
#
|
29
|
-
def should!
|
30
|
-
return Expectation.new(self, :negate=>true, :backtrace=>caller)
|
31
|
-
end
|
32
|
-
|
33
|
-
# See #should! method.
|
34
|
-
#
|
35
|
-
alias_method :should_not, :should!
|
36
|
-
|
37
|
-
#
|
38
|
-
#alias_method :should_raise, :assert_raises
|
39
|
-
|
40
|
-
#
|
41
|
-
#alias_method :should_not_raise, :assert_raises!
|
42
|
-
|
43
|
-
end
|
44
|
-
|
45
|
-
end
|
46
|
-
|
47
|
-
class ::Object #:nodoc:
|
48
|
-
include Grammar::Should
|
49
|
-
end
|
50
|
-
|
51
|
-
end
|
52
|
-
|
@@ -1,23 +0,0 @@
|
|
1
|
-
BEGIN {
|
2
|
-
module Kernel
|
3
|
-
|
4
|
-
h = Hash.new
|
5
|
-
|
6
|
-
define_method(:requiree) do
|
7
|
-
h
|
8
|
-
end
|
9
|
-
|
10
|
-
r = method :require
|
11
|
-
|
12
|
-
define_method(:require) do |a|
|
13
|
-
r.call(a)
|
14
|
-
h[a] = caller
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|
18
|
-
}
|
19
|
-
|
20
|
-
|
21
|
-
def p(*args)
|
22
|
-
super *(args << caller[0])
|
23
|
-
end
|