expectations 0.1.1 → 0.1.2
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/README +31 -1
- data/lib/expectations.rb +1 -0
- data/rakefile.rb +1 -1
- metadata +2 -2
data/README
CHANGED
@@ -84,8 +84,38 @@ expectations can be used for state based and behavior based testing.
|
|
84
84
|
Object.give_me_three(stub(:three=>3).three)
|
85
85
|
end
|
86
86
|
|
87
|
+
# State based test matching a Regexp
|
88
|
+
expect /a string/ do
|
89
|
+
"a string"
|
90
|
+
end
|
91
|
+
|
92
|
+
# State based test checking if actual is in the expected Range
|
93
|
+
expect 1..5 do
|
94
|
+
3
|
95
|
+
end
|
96
|
+
|
97
|
+
# State based test to determine if the object is an instance of the module
|
98
|
+
expect Enumerable do
|
99
|
+
[]
|
100
|
+
end
|
101
|
+
|
102
|
+
# State based test to determine if the object is an instance of the class
|
103
|
+
expect String do
|
104
|
+
"a string"
|
105
|
+
end
|
106
|
+
|
107
|
+
# State based test to determine if the modules are the same
|
108
|
+
expect Enumerable do
|
109
|
+
Enumerable
|
110
|
+
end
|
111
|
+
|
112
|
+
# State based test to determine if the classes are the same
|
113
|
+
expect String do
|
114
|
+
String
|
115
|
+
end
|
116
|
+
|
87
117
|
end
|
88
118
|
|
89
119
|
== Contributors
|
90
120
|
|
91
|
-
Matt Mower
|
121
|
+
Matt Mower, Ola Bini, George Malamidis, Brian Guthrie
|
data/lib/expectations.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.2"
|
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
|
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.2
|
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-16 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|