Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Prevent git_frindly_dumper from creating an inner class on fixtures load

  • Loading branch information...
commit 39767b1a03ea060a2467f35b0787f6693b7e49ad 1 parent c05f2f2
@ianwhite authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.