diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-05-19 16:37:41 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-05-20 15:18:57 +0200 |
commit | aacf2581cde0147dc66c3eeacf6d7447c2bbafdf (patch) | |
tree | a7f099044c0e8678454af5852a415c757c567c94 /activesupport/test | |
parent | 7f07cc364a7ee7ceae21b29b54467fde0db93389 (diff) | |
download | rails-aacf2581cde0147dc66c3eeacf6d7447c2bbafdf.tar.gz rails-aacf2581cde0147dc66c3eeacf6d7447c2bbafdf.tar.bz2 rails-aacf2581cde0147dc66c3eeacf6d7447c2bbafdf.zip |
refactor evals and adds some __FILE__ and __LINE__
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/dependencies_test.rb | 2 | ||||
-rw-r--r-- | activesupport/test/inflector_test.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index 2cbf9e5042..75ff88505d 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -371,7 +371,7 @@ class DependenciesTest < Test::Unit::TestCase end def test_custom_const_missing_should_work - Object.module_eval <<-end_eval + Object.module_eval <<-end_eval, __FILE__, __LINE__ + 1 module ModuleWithCustomConstMissing def self.const_missing(name) const_set name, name.to_s.hash diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb index 76bdc0e973..2990177bed 100644 --- a/activesupport/test/inflector_test.rb +++ b/activesupport/test/inflector_test.rb @@ -209,14 +209,14 @@ class InflectorTest < Test::Unit::TestCase end %w{plurals singulars uncountables humans}.each do |inflection_type| - class_eval " + class_eval <<-RUBY, __FILE__, __LINE__ + 1 def test_clear_#{inflection_type} cached_values = ActiveSupport::Inflector.inflections.#{inflection_type} ActiveSupport::Inflector.inflections.clear :#{inflection_type} assert ActiveSupport::Inflector.inflections.#{inflection_type}.empty?, \"#{inflection_type} inflections should be empty after clear :#{inflection_type}\" ActiveSupport::Inflector.inflections.instance_variable_set :@#{inflection_type}, cached_values end - " + RUBY end def test_clear_all |