Permalink
Browse files

Prevent git_frindly_dumper from creating an inner class on fixtures load

  • Loading branch information...
1 parent c05f2f2 commit 39767b1a03ea060a2467f35b0787f6693b7e49ad @ianwhite committed Aug 11, 2010
Showing with 1 addition and 3 deletions.
  1. +0 −2 features/load/raise_load_errors.feature
  2. +1 −1 lib/git_friendly_dumper.rb
View
2 features/load/raise_load_errors.feature
@@ -58,8 +58,6 @@ Feature: Raise load errors
| true | 1 | should |
| 1 | 1 | should |
-
- @announce
Scenario Outline: can also silence errors loading a fixture
Given a file named "db/dump/users/schema.rb" with:
"""
View
2 lib/git_friendly_dumper.rb
@@ -125,7 +125,7 @@ def load_fixtures
table = fixture.split('/').first
if (!tables || tables.include?(table))
unless fixtures_tables.include?(table)
- klass = eval "class #{table.classify} < ActiveRecord::Base; end"
+ eval "class ::#{table.classify} < ActiveRecord::Base; end"
fixtures_tables << table
end
fixture

0 comments on commit 39767b1

Please sign in to comment.