expectations 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/expectations/mock_recorder.rb +5 -0
- data/lib/expectations/suite.rb +1 -1
- data/rakefile.rb +1 -1
- data/test/failures.rb +3 -62
- metadata +2 -2
data/lib/expectations/suite.rb
CHANGED
data/rakefile.rb
CHANGED
@@ -41,7 +41,7 @@ specification = Gem::Specification.new do |s|
|
|
41
41
|
expect NoMethodError do
|
42
42
|
Object.invalid_method_call
|
43
43
|
end."
|
44
|
-
s.version = "0.1.
|
44
|
+
s.version = "0.1.3"
|
45
45
|
s.author = 'Jay Fields'
|
46
46
|
s.description = "A lightweight unit testing framework. Tests (expectations) will be written as follows
|
47
47
|
expect 2 do
|
data/test/failures.rb
CHANGED
@@ -2,8 +2,8 @@ require File.dirname(__FILE__) + "/test_helper"
|
|
2
2
|
|
3
3
|
Expectations do
|
4
4
|
|
5
|
-
# State based expectation where a value equals another value
|
6
|
-
expect 2 do
|
5
|
+
# State based expectation where a value equals another value
|
6
|
+
expect 2 do
|
7
7
|
3
|
8
8
|
end
|
9
9
|
|
@@ -50,63 +50,4 @@ Expectations do
|
|
50
50
|
Object.give_me_three(stub(:three=>3).threes)
|
51
51
|
end
|
52
52
|
|
53
|
-
end
|
54
|
-
# >> Expectations FE..EFEEE
|
55
|
-
# >> Finished in 0.00240 seconds
|
56
|
-
# >>
|
57
|
-
# >> Failure: 2 failed, 5 errors, 2 fulfilled
|
58
|
-
# >>
|
59
|
-
# >> --Errors--
|
60
|
-
# >> -:11:in `expect'
|
61
|
-
# >> file <->
|
62
|
-
# >> line <11>
|
63
|
-
# >> error <undefined method `no_method' for Object:Class>
|
64
|
-
# >> trace
|
65
|
-
# >> -:12
|
66
|
-
# >> -:3
|
67
|
-
# >> expected: <ArgumentError> got: <NoMethodError>
|
68
|
-
# >>
|
69
|
-
# >> -:28:in `expect'
|
70
|
-
# >> file <->
|
71
|
-
# >> line <28>
|
72
|
-
# >> error <undefined method `no_deal' for Object:Class>
|
73
|
-
# >> trace
|
74
|
-
# >> -:29:in `__instance_exec0'
|
75
|
-
# >> -:3
|
76
|
-
# >>
|
77
|
-
# >> -:37:in `expect'
|
78
|
-
# >> file <->
|
79
|
-
# >> line <37>
|
80
|
-
# >> error <#<Mock:0x66e57c>.twos() - expected calls: 0, actual calls: 1>
|
81
|
-
# >> trace
|
82
|
-
# >> -:38
|
83
|
-
# >> -:3
|
84
|
-
# >>
|
85
|
-
# >> -:42:in `expect'
|
86
|
-
# >> file <->
|
87
|
-
# >> line <42>
|
88
|
-
# >> error <undefined method `barter' for Object:Class>
|
89
|
-
# >> trace
|
90
|
-
# >> -:44
|
91
|
-
# >> -:3
|
92
|
-
# >>
|
93
|
-
# >> -:48:in `expect'
|
94
|
-
# >> file <->
|
95
|
-
# >> line <48>
|
96
|
-
# >> error <#<Mock:0x66caec>.threes() - expected calls: 0, actual calls: 1>
|
97
|
-
# >> trace
|
98
|
-
# >> -:50
|
99
|
-
# >> -:3
|
100
|
-
# >>
|
101
|
-
# >>
|
102
|
-
# >> --Failures--
|
103
|
-
# >> -:6:in `expect'
|
104
|
-
# >> file <->
|
105
|
-
# >> line <6>
|
106
|
-
# >> expected: <2> got: <3>
|
107
|
-
# >>
|
108
|
-
# >> -:33:in `expect'
|
109
|
-
# >> file <->
|
110
|
-
# >> line <33>
|
111
|
-
# >> #<Mock:0x66f120>.deal(any_parameters) - expected calls: 1, actual calls: 0
|
112
|
-
# >>
|
53
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: expectations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jay Fields
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-01-
|
12
|
+
date: 2008-01-18 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|