aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/inflector_test.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-05-19 16:37:41 -0300
committerJosé Valim <jose.valim@gmail.com>2010-05-20 15:18:57 +0200
commitaacf2581cde0147dc66c3eeacf6d7447c2bbafdf (patch)
treea7f099044c0e8678454af5852a415c757c567c94 /activesupport/test/inflector_test.rb
parent7f07cc364a7ee7ceae21b29b54467fde0db93389 (diff)
downloadrails-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/inflector_test.rb')
-rw-r--r--activesupport/test/inflector_test.rb4
1 files changed, 2 insertions, 2 deletions
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