Permalink
Browse files

Added a few tests around initialize.

  • Loading branch information...
jnunemaker committed Apr 21, 2012
1 parent ffaee62 commit a18acb4fe3432a8b58a5f2bc46ff9e0d52d06584
Showing with 6 additions and 0 deletions.
  1. +6 −0 test/google_weather_test.rb
@@ -4,10 +4,16 @@ class GoogleWeatherTest < Test::Unit::TestCase
context "Initialization" do
should "require a value" do
lambda { GoogleWeather.new }.should raise_error
+ end
+ should "set param" do
GoogleWeather.new(46544).param.should == 46544
end
+ should "work with string" do
+ GoogleWeather.new('Mishawaka, IN').param.should == 'Mishawaka, IN'
+ end
+
should "convert lat, lng array into string of e6 formatted lat,lng values" do
GoogleWeather.new([32.24959602450668,-110.8394506158091]).param.should == ',,,32249596,-110839450'
end

0 comments on commit a18acb4

Please sign in to comment.