Skip to content

Instantly share code, notes, and snippets.

@dreamr
Created May 6, 2013 04:13
Show Gist options
  • Save dreamr/5523315 to your computer and use it in GitHub Desktop.
Save dreamr/5523315 to your computer and use it in GitHub Desktop.
What is wrong with these tests? (Phil cannot answer)
FAIL WeedMapsAPI::V1::DispensaryDetailCall::with a clean index#test_0001_returns dispensary details (0.00s)
--- expected
+++ actual
@@ -1,3 +1,3 @@
{:z=>105, :n=>"Dr. Greenthumb Garden Supply 142", :i=>0, :distance=>13, :hits=>0, :a=>"175 River Terrace Fremont Ca 94539", :phone=>"555-555-1142", :rating=>0.0, :y=>-121.9674, :x=>37.5770843, :h=>"10am - 10pm", :d=>"4g eighths, Referrals - free eighth", :link=>"http://example.com/dispensaries/xxx", :kinds=>"2 sativa 1 indica", :photos=>[], :reviews=>[{:z=>63, :name=>"username508", :i=>"", :title=>"This is a cool place.", :r=>5, :comments=>"And I like it.\r
-", :when=>"May 5th, 2013"}, {:z=>62, :name=>"username507", :i=>"", :title=>"This is a cool place.", :r=>5, :comments=>"And I like it.\r
-", :when=>"May 5th, 2013"}]}
+", :when=>"May 6th, 2013"}, {:z=>62, :name=>"username507", :i=>"", :title=>"This is a cool place.", :r=>5, :comments=>"And I like it.\r
+", :when=>"May 6th, 2013"}]}
(eval):8:in `must_equal'
/Users/dreamr/Code/weedmaps/weedmaps/test/weedmaps_api/v1/dispensary_detail_call_test.rb:55:in `block (3 levels) in <top (required)>'
/Users/dreamr/.rvm/gems/ruby-1.9.3-p385/gems/guard-minitest-0.5.0/lib/guard/minitest/runners/version_2_runner.rb:12:in `_run_anything'
FAIL WeedMapsAPI::V1::HashBuilder::#build_review_hash#test_0001_returns the review hash expected by the API (0.00s)
--- expected
+++ actual
@@ -1 +1 @@
-{:z=>65, :name=>"testuser", :i=>"", :title=>"Awesome!", :r=>5, :comments=>"This is a great place.", :when=>"May 5th, 2013"}
+{:z=>65, :name=>"testuser", :i=>"", :title=>"Awesome!", :r=>5, :comments=>"This is a great place.", :when=>"May 6th, 2013"}
(eval):8:in `must_equal'
/Users/dreamr/Code/weedmaps/weedmaps/test/weedmaps_api/v1/hash_builder_test.rb:19:in `block (3 levels) in <top (required)>'
/Users/dreamr/.rvm/gems/ruby-1.9.3-p385/gems/guard-minitest-0.5.0/lib/guard/minitest/runners/version_2_runner.rb:12:in `_run_anything'
FAIL WeedMapsAPI::V1::ReviewDetailCall::#review_detail::with valid params#test_0001_returns the specific review requested (0.00s)
--- expected
+++ actual
@@ -1 +1 @@
-[{:z=>88, :name=>"testuser", :i=>"", :title=>"Awesome!", :r=>5, :comments=>"This is a great place.", :when=>"May 5th, 2013"}]
+[{:z=>88, :name=>"testuser", :i=>"", :title=>"Awesome!", :r=>5, :comments=>"This is a great place.", :when=>"May 6th, 2013"}]
(eval):8:in `must_equal'
/Users/dreamr/Code/weedmaps/weedmaps/test/weedmaps_api/v1/review_detail_call_test.rb:20:in `block (4 levels) in <top (required)>'
/Users/dreamr/.rvm/gems/ruby-1.9.3-p385/gems/guard-minitest-0.5.0/lib/guard/minitest/runners/version_2_runner.rb:12:in `_run_anything'
FAIL WeedMapsAPI::V1::ReviewDetailCall::#review_detail::with valid params::when a dispensary has more than one review#test_0001_also returns a summary of the dispensary's next oldest review (0.00s)
--- expected
+++ actual
@@ -1 +1 @@
-[{:z=>90, :name=>"testuser", :i=>"", :title=>"This place sucks!", :r=>5, :comments=>"They've really gone downhill.", :when=>"May 5th, 2013"}, {:z=>89, :r=>5, :title=>"Awesome!", :comments=>"This is a great place."}]
+[{:z=>90, :name=>"testuser", :i=>"", :title=>"This place sucks!", :r=>5, :comments=>"They've really gone downhill.", :when=>"May 6th, 2013"}, {:z=>89, :r=>5, :title=>"Awesome!", :comments=>"This is a great place."}]
(eval):8:in `must_equal'
/Users/dreamr/Code/weedmaps/weedmaps/test/weedmaps_api/v1/review_detail_call_test.rb:44:in `block (5 levels) in <top (required)>'
/Users/dreamr/.rvm/gems/ruby-1.9.3-p385/gems/guard-minitest-0.5.0/lib/guard/minitest/runners/version_2_runner.rb:12:in `_run_anything'
FAIL WeedMapsAPI::V1::ReviewsCall::#reviews#test_0001_returns the reviews for a given company (0.00s)
--- expected
+++ actual
@@ -1 +1 @@
-[{:z=>92, :name=>"testuser", :i=>"", :title=>"Awesome!", :r=>5, :comments=>"This is a great place.", :when=>"May 5th, 2013"}]
+[{:z=>92, :name=>"testuser", :i=>"", :title=>"Awesome!", :r=>5, :comments=>"This is a great place.", :when=>"May 6th, 2013"}]
(eval):8:in `must_equal'
/Users/dreamr/Code/weedmaps/weedmaps/test/weedmaps_api/v1/reviews_call_test.rb:50:in `block (3 levels) in <top (required)>'
/Users/dreamr/.rvm/gems/ruby-1.9.3-p385/gems/guard-minitest-0.5.0/lib/guard/minitest/runners/version_2_runner.rb:12:in `_run_anything'
@nitsujw
Copy link

nitsujw commented May 6, 2013

Change Time.now to Time.zone.now; profit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment