Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a few tests around initialize.

  • Loading branch information...
commit a18acb4fe3432a8b58a5f2bc46ff9e0d52d06584 1 parent ffaee62
@jnunemaker authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 test/google_weather_test.rb
View
6 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
Please sign in to comment.
Something went wrong with that request. Please try again.