montage_rails 0.7.1 → 0.7.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.
- checksums.yaml +4 -4
- data/lib/montage_rails/base/column.rb +3 -2
- data/lib/montage_rails/version.rb +1 -1
- data/test/dummy/log/test.log +1195 -0
- data/test/montage_rails/base/column_test.rb +27 -0
- metadata +2 -2
@@ -55,5 +55,32 @@ class MontageRails::Base::ColumnTest < Minitest::Test
|
|
55
55
|
column = MontageRails::Base::Column.new("foo", "float")
|
56
56
|
assert_equal "foo", column.coerce("foo")
|
57
57
|
end
|
58
|
+
|
59
|
+
should "coerce a float to a float when the float is not a string" do
|
60
|
+
column = MontageRails::Base::Column.new("foo", "numeric")
|
61
|
+
assert_equal 60.0, column.coerce(60.000000)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
context "is_i?" do
|
66
|
+
setup do
|
67
|
+
@column = MontageRails::Base::Column.new("foo", "numeric")
|
68
|
+
end
|
69
|
+
|
70
|
+
should "properly handle Fixnum and Floats" do
|
71
|
+
assert @column.is_i?(60)
|
72
|
+
refute @column.is_i?(60.45)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
context "is_f?" do
|
77
|
+
setup do
|
78
|
+
@column = MontageRails::Base::Column.new("foo", "numeric")
|
79
|
+
end
|
80
|
+
|
81
|
+
should "properly handle Fixnum and floats" do
|
82
|
+
assert @column.is_f?(60.45)
|
83
|
+
refute @column.is_f?(60)
|
84
|
+
end
|
58
85
|
end
|
59
86
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: montage_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dphaener
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|