From ffaa746e9e08604f3040081fdf75b74461548400 Mon Sep 17 00:00:00 2001 From: Andreas Ronge Date: Mon, 12 Dec 2011 19:35:36 +0100 Subject: [PATCH] Adding debug and push this since I can't reproduce the RSpec failure locally. (finding nonexistant_id for the specs.) --- .travis.yml | 3 +-- spec/rails/finders_spec.rb | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7d10d72c4..50d39b5ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,5 @@ rvm: env: - "IDENTITY_MAP=true" - "IDENTITY_MAP=false" - - IDENTITY_MAP=true JRUBY_OPTS=--1.9 - - IDENTITY_MAP=false JRUBY_OPTS=--1.9 + - "JRUBY_OPTS=--1.9" diff --git a/spec/rails/finders_spec.rb b/spec/rails/finders_spec.rb index 70c12f9fd..d8afc0141 100644 --- a/spec/rails/finders_spec.rb +++ b/spec/rails/finders_spec.rb @@ -79,8 +79,19 @@ def non_findable_model_allocated_ids end it "should return an empty array when passed multiple non-existant ids" do - FindableModel.find(nonexistant_id, nonexistant_id, nonexistant_id, nonexistant_id).should == [] - FindableModel.find(nonexistant_id.to_s, nonexistant_id.to_s, nonexistant_id.to_s, nonexistant_id.to_s).should == [] + ids = [nonexistant_id, nonexistant_id, nonexistant_id, nonexistant_id] + all = FindableModel.find(*ids) + all.each {|x| puts "found1: #{x.id}/#{x.class} for #{ids.join(', ')}"} + + ids2 = [nonexistant_id, nonexistant_id, nonexistant_id, nonexistant_id] + all2 = FindableModel.find(*ids2) + all2.each {|x| puts "found2: #{x.id}/#{x.class} for #{ids2.join(', ')}"} + + all.should be_empty + all2.should be_empty + + #FindableModel.find(nonexistant_id, nonexistant_id, nonexistant_id, nonexistant_id).should == [] + #FindableModel.find(nonexistant_id.to_s, nonexistant_id.to_s, nonexistant_id.to_s, nonexistant_id.to_s).should == [] end it "should return nil for ids allocated to other node types" do