thermometer 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/thermometer/active_record.rb +25 -26
- data/lib/thermometer/evaluate.rb +14 -9
- data/lib/thermometer/temperature.rb +7 -12
- data/lib/thermometer/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +9107 -0
- data/test/dummy/log/test.log +44003 -0
- data/test/thermometer_test.rb +24 -0
- metadata +2 -2
data/test/thermometer_test.rb
CHANGED
@@ -5,4 +5,28 @@ class ThermometerTest < ActiveSupport::TestCase
|
|
5
5
|
assert_kind_of Module, Thermometer
|
6
6
|
end
|
7
7
|
|
8
|
+
test "Thermometer yields a configuration" do
|
9
|
+
Thermometer.configure do |c|
|
10
|
+
assert_instance_of Thermometer::Configuration , c
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
test "Configuration as a config Hash" do
|
15
|
+
assert_kind_of Hash, Thermometer.configuration.config
|
16
|
+
end
|
17
|
+
|
18
|
+
test "Configuration has a config Hash" do
|
19
|
+
assert_kind_of Hash, Thermometer.configuration.config
|
20
|
+
end
|
21
|
+
|
22
|
+
test "Configuration has a time_ranges Hash" do
|
23
|
+
assert_kind_of ActiveSupport::HashWithIndifferentAccess, Thermometer.configuration.time_ranges
|
24
|
+
end
|
25
|
+
|
26
|
+
test "Configuration has a scope_options Hash" do
|
27
|
+
assert_kind_of Hash, Thermometer.configuration.scope_options
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
|
8
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thermometer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Newell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|