qed 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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