sniff 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'active_support'
|
2
|
+
|
1
3
|
Given /^an? (.+) emitter$/ do |name|
|
2
4
|
name = name.gsub(/\s+/,'_').camelize + 'Record'
|
3
5
|
@activity = name.constantize
|
@@ -62,7 +64,7 @@ Then /^the conclusion of the committee should include a key of "(.*)" and value
|
|
62
64
|
if key.present?
|
63
65
|
@report.conclusion.keys.map(&:to_s).should include(key)
|
64
66
|
else
|
65
|
-
@report.conclusion.keys.map(&:to_s).should
|
67
|
+
@report.conclusion.keys.map(&:to_s).should be_blank
|
66
68
|
end
|
67
69
|
|
68
70
|
if value.present?
|
@@ -87,7 +89,7 @@ end
|
|
87
89
|
|
88
90
|
Then /^the conclusion of the committee should have a( single)? record identified with "(.*)" of "(.*)" and having "(.*)" of "(.*)"$/ do |single, id_field, id, field, value|
|
89
91
|
if value.blank?
|
90
|
-
@report.conclusion.should
|
92
|
+
@report.conclusion.should be_blank
|
91
93
|
else
|
92
94
|
id_field = id_field.to_sym
|
93
95
|
records = @report.conclusion
|
@@ -119,6 +121,6 @@ Then /^the conclusion of the committee should include a key of "(.*)" and subval
|
|
119
121
|
actual_subvalue2 = coerce_value(@report.conclusion[key.to_s][subkey2.to_sym].to_s)
|
120
122
|
compare_values(actual_subvalue2, subvalue2)
|
121
123
|
else
|
122
|
-
@report.conclusion.keys.map(&:to_s).should
|
124
|
+
@report.conclusion.keys.map(&:to_s).should be_blank
|
123
125
|
end
|
124
126
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'date'
|
2
|
+
require 'active_support'
|
2
3
|
|
3
4
|
def coerce_value(value)
|
4
5
|
# what is this, PHP?
|
@@ -18,8 +19,8 @@ def coerce_value(value)
|
|
18
19
|
end
|
19
20
|
|
20
21
|
def compare_values(a, b)
|
21
|
-
if b.
|
22
|
-
a.should
|
22
|
+
if b.blank?
|
23
|
+
a.should be_blank
|
23
24
|
elsif a.is_a? Date or a.is_a? Time
|
24
25
|
b = Date.parse b
|
25
26
|
a.should == b
|
@@ -35,8 +36,8 @@ def compare_values(a, b)
|
|
35
36
|
end
|
36
37
|
|
37
38
|
def equality?(a, b)
|
38
|
-
if b.
|
39
|
-
a.
|
39
|
+
if b.blank?
|
40
|
+
a.blank?
|
40
41
|
elsif a.is_a? Date or a.is_a? Time
|
41
42
|
b = Date.parse b
|
42
43
|
a == b
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sniff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 13
|
10
|
+
version: 0.1.13
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Derek Kastner
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-13 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -24,15 +24,14 @@ dependencies:
|
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 7
|
30
30
|
segments:
|
31
31
|
- 3
|
32
32
|
- 0
|
33
33
|
- 0
|
34
|
-
|
35
|
-
version: 3.0.0.beta4
|
34
|
+
version: 3.0.0
|
36
35
|
type: :runtime
|
37
36
|
version_requirements: *id001
|
38
37
|
- !ruby/object:Gem::Dependency
|
@@ -41,15 +40,14 @@ dependencies:
|
|
41
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
42
41
|
none: false
|
43
42
|
requirements:
|
44
|
-
- -
|
43
|
+
- - ~>
|
45
44
|
- !ruby/object:Gem::Version
|
46
|
-
hash:
|
45
|
+
hash: 7
|
47
46
|
segments:
|
48
47
|
- 3
|
49
48
|
- 0
|
50
49
|
- 0
|
51
|
-
|
52
|
-
version: 3.0.0.beta4
|
50
|
+
version: 3.0.0
|
53
51
|
type: :runtime
|
54
52
|
version_requirements: *id002
|
55
53
|
- !ruby/object:Gem::Dependency
|
@@ -58,7 +56,7 @@ dependencies:
|
|
58
56
|
requirement: &id003 !ruby/object:Gem::Requirement
|
59
57
|
none: false
|
60
58
|
requirements:
|
61
|
-
- -
|
59
|
+
- - ~>
|
62
60
|
- !ruby/object:Gem::Version
|
63
61
|
hash: 27
|
64
62
|
segments:
|
@@ -74,7 +72,7 @@ dependencies:
|
|
74
72
|
requirement: &id004 !ruby/object:Gem::Requirement
|
75
73
|
none: false
|
76
74
|
requirements:
|
77
|
-
- -
|
75
|
+
- - ~>
|
78
76
|
- !ruby/object:Gem::Version
|
79
77
|
hash: 17
|
80
78
|
segments:
|
@@ -106,7 +104,7 @@ dependencies:
|
|
106
104
|
requirement: &id006 !ruby/object:Gem::Requirement
|
107
105
|
none: false
|
108
106
|
requirements:
|
109
|
-
- -
|
107
|
+
- - ~>
|
110
108
|
- !ruby/object:Gem::Version
|
111
109
|
hash: 15
|
112
110
|
segments:
|
@@ -164,7 +162,7 @@ dependencies:
|
|
164
162
|
requirement: &id010 !ruby/object:Gem::Requirement
|
165
163
|
none: false
|
166
164
|
requirements:
|
167
|
-
- -
|
165
|
+
- - ~>
|
168
166
|
- !ruby/object:Gem::Version
|
169
167
|
hash: 62196417
|
170
168
|
segments:
|
@@ -210,7 +208,7 @@ dependencies:
|
|
210
208
|
requirement: &id013 !ruby/object:Gem::Requirement
|
211
209
|
none: false
|
212
210
|
requirements:
|
213
|
-
- -
|
211
|
+
- - ~>
|
214
212
|
- !ruby/object:Gem::Version
|
215
213
|
hash: 23
|
216
214
|
segments:
|