sniff 0.4.6 → 0.4.7
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.
@@ -5,6 +5,7 @@ Given /^an? (.+) emission$/ do |emitter|
|
|
5
5
|
@emitter_class = emitter.gsub(/\s+/,'_').camelize
|
6
6
|
@emitter_class = "#{@emitter_class}Record".constantize
|
7
7
|
@activity_hash = {}
|
8
|
+
@expectations = []
|
8
9
|
end
|
9
10
|
|
10
11
|
Given /^an? (.+) has nothing$/ do |emitter|
|
@@ -39,6 +40,7 @@ end
|
|
39
40
|
When /^emissions are calculated$/ do
|
40
41
|
@timeframe ||= Timeframe.this_year
|
41
42
|
@activity = @emitter_class.from_params_hash @activity_hash
|
43
|
+
@expectations.map(&:call)
|
42
44
|
if @current_date
|
43
45
|
Timecop.travel(@current_date) do
|
44
46
|
@emission = @activity.emission @timeframe
|
@@ -4,11 +4,15 @@ Given /^an? (.+) emitter$/ do |name|
|
|
4
4
|
name = name.gsub(/\s+/,'_').camelize + 'Record'
|
5
5
|
@activity = name.constantize
|
6
6
|
@characteristics ||= {}
|
7
|
+
@expectations ||= []
|
7
8
|
end
|
8
9
|
|
9
10
|
Given /^(a )?characteristic "(.*)" of integer value "(.*)"$/ do |_, name, value|
|
10
11
|
Given "characteristic \"#{name}\" of \"#{value}\", converted with \"to_i\""
|
11
12
|
end
|
13
|
+
Given /^(a )?characteristic "(.*)" of address value "(.*)"$/ do |_, name, value|
|
14
|
+
Given "characteristic \"#{name}\" of \"#{value}\", converted with \"to_s\""
|
15
|
+
end
|
12
16
|
|
13
17
|
Given /^(a )?characteristic "(.*)" of "([^\"]*)"(, converted with "(.*)")?$/ do |_, name, value, __, converter|
|
14
18
|
if name =~ /\./
|
@@ -38,6 +42,7 @@ Given /^(a )?characteristic "(.*)" including "(.*)"$/ do |_, name, values|
|
|
38
42
|
end
|
39
43
|
|
40
44
|
When /^the "(.*)" committee is calculated$/ do |committee_name|
|
45
|
+
@expectations.map(&:call)
|
41
46
|
@decision ||= @activity.decisions[:emission]
|
42
47
|
@committee = @decision.committees.find { |c| c.name.to_s == committee_name }
|
43
48
|
args = [@activity, @characteristics]
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 0.4.
|
8
|
+
- 7
|
9
|
+
version: 0.4.7
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Derek Kastner
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-12-
|
17
|
+
date: 2010-12-17 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -325,7 +325,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
325
325
|
requirements:
|
326
326
|
- - ">="
|
327
327
|
- !ruby/object:Gem::Version
|
328
|
-
hash:
|
328
|
+
hash: 426531793
|
329
329
|
segments:
|
330
330
|
- 0
|
331
331
|
version: "0"
|