Permalink
Browse files

assert on empty array is always true. fixing test.

  • Loading branch information...
1 parent 6a55ca3 commit 0495736339df48a625fd58f4304b7b497b02d859 Neeraj Singh committed with tenderlove Sep 30, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activeresource/test/cases/format_test.rb
@@ -33,7 +33,7 @@ def test_formats_on_collection
ActiveResource::HttpMock.respond_to.get "/people.#{format}", {'Accept' => ActiveResource::Formats[format].mime_type}, ActiveResource::Formats[format].encode(@programmers)
remote_programmers = Person.find(:all)
assert_equal 2, remote_programmers.size
- assert remote_programmers.select { |p| p.name == 'David' }
+ assert remote_programmers.map { |p| p.name }.include? 'David'
@2shortplanks
2shortplanks Jan 11, 2011

Can we change to a more descriptive variable name too?

end
end
end
@excursively
excursively Jul 11, 2012

kri kri, last line.

@NightmaresWithin
NightmaresWithin Jun 28, 2013

This is definitely the end! AAAAhhhhh

11 comments on commit 0495736

@miloops

Why not using any, detect or find instead of both map and include?

@tenderlove
Member

@miloops good question. I changed it here: ef8ce78

@neerajdotname
Member

Not sure what I was thinking . Thanks for the correction.

@sikachu
Member
sikachu commented on 0495736 Jun 9, 2011

What's going on with the comment thread here?

@henrikhodne

@sikachu This page is featured on https://github.com/features/projects/codereview, that may be why.

@barnabytprowe

Testing

@jameshsieh

我測試,很好!

@mhuggins

Am I missing some joke? What's with all the 'test' comments and the like?

@JinsooHan

#5686 This is issue number link.

@nimeia
nimeia commented on 0495736 Oct 8, 2013

nicai

Please sign in to comment.