mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Use Enumerable#with_index. We're on Ruby > 1.8.7 (part II)
This commit is contained in:
@@ -178,11 +178,9 @@ class FixturesTest < ActiveRecord::TestCase
|
||||
assert_nothing_raised do
|
||||
fixtures = ActiveRecord::Fixtures.new(Account.connection, 'categories', 'Category', FIXTURES_ROOT + "/categories_ordered")
|
||||
|
||||
i = 0
|
||||
fixtures.each do |name, fixture|
|
||||
fixtures.each.with_index do |(name, fixture), i|
|
||||
assert_equal "fixture_no_#{i}", name
|
||||
assert_equal "Category #{i}", fixture['name']
|
||||
i += 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user