Permalink
Browse files

assert on empty array is always true. fixing test.

  • Loading branch information...
Neeraj Singh authored and tenderlove committed Sep 30, 2010
1 parent 6a55ca3 commit 0495736339df48a625fd58f4304b7b497b02d859
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)

This comment has been minimized.

@j7d6

This comment has been minimized.

@kheradmand
remote_programmers = Person.find(:all)

This comment has been minimized.

@poison
assert_equal 2, remote_programmers.size

This comment has been minimized.

@anandagar

This comment has been minimized.

@gutman23
assert remote_programmers.select { |p| p.name == 'David' }

This comment has been minimized.

@crazybob

This comment has been minimized.

@alecgo

This comment has been minimized.

@Muralidharan

This comment has been minimized.

@nonull

This comment has been minimized.

@j7d6

This comment has been minimized.

@nycgavin
assert remote_programmers.map { |p| p.name }.include? 'David'

This comment has been minimized.

@2shortplanks

2shortplanks Jan 11, 2011

Can we change to a more descriptive variable name too?

This comment has been minimized.

@la3lma

la3lma Sep 6, 2011

Blah, Humbug

This comment has been minimized.

@kobkrit

This comment has been minimized.

@lisandroTSilva
end
end

This comment has been minimized.

@dalbrekt

This comment has been minimized.

@dalbrekt
end

This comment has been minimized.

@excursively

excursively Jul 11, 2012

kri kri, last line.

This comment has been minimized.

@hbjerry

This comment has been minimized.

@NightmaresWithin

NightmaresWithin Jun 28, 2013

This is definitely the end! AAAAhhhhh

11 comments on commit 0495736

@miloops

This comment has been minimized.

Contributor

miloops replied Sep 30, 2010

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

@tenderlove

This comment has been minimized.

Member

tenderlove replied Sep 30, 2010

@miloops good question. I changed it here: ef8ce78

@neerajdotname

This comment has been minimized.

Member

neerajdotname replied Sep 30, 2010

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

@sikachu

This comment has been minimized.

Member

sikachu replied Jun 9, 2011

What's going on with the comment thread here?

@sarahhodne

This comment has been minimized.

Contributor

sarahhodne replied Nov 6, 2011

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

@barnabytprowe

This comment has been minimized.

barnabytprowe replied Feb 29, 2012

Testing

@jameshsieh

This comment has been minimized.

jameshsieh replied Oct 11, 2012

我測試,很好!

@mhuggins

This comment has been minimized.

mhuggins replied Oct 23, 2012

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

@steveklabnik

This comment has been minimized.

Member

steveklabnik replied Oct 24, 2012

@JinsooHan

This comment has been minimized.

JinsooHan replied Mar 14, 2013

#5686 This is issue number link.

@nimeia

This comment has been minimized.

nimeia replied Oct 8, 2013

nicai

Please sign in to comment.