test/utils_test.rb in picasa-0.7.2 vs test/utils_test.rb in picasa-0.7.3
- old
+ new
@@ -57,9 +57,20 @@
it "converts given value to integer" do
assert_equal 101, Picasa::Utils.map_to_integer("101")
end
end
+ describe "#map_to_float" do
+ it "does not convert nil value" do
+ assert_nil Picasa::Utils.map_to_float(nil)
+ end
+
+ it "converts given value to float" do
+ assert_in_delta 101.123, Picasa::Utils.map_to_float("101.123")
+ end
+ end
+
+
describe "#map_to_date" do
it "does not convert nil value" do
assert_nil Picasa::Utils.map_to_date(nil)
end