Skip to content

Commit

Permalink
Adding debug and push this since I can't reproduce the RSpec failure …
Browse files Browse the repository at this point in the history
…locally. (finding nonexistant_id for the specs.)
  • Loading branch information
andreasronge committed Dec 13, 2011
1 parent fe256c0 commit ffaa746
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Expand Up @@ -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"

15 changes: 13 additions & 2 deletions spec/rails/finders_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit ffaa746

Please sign in to comment.