diff options
author | Akira Matsuda <ronnie@dio.jp> | 2016-01-24 23:22:14 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2016-01-24 23:37:26 +0900 |
commit | 8f35fcec568883f64df6cf0b04305d23bd49d615 (patch) | |
tree | 5349d6ed140426b68e8aeaffdd32f9895dc0f691 /activesupport/test/multibyte_conformance_test.rb | |
parent | bd2178f1153a050cf9bcd4e311ea93fe9ba7506f (diff) | |
download | rails-8f35fcec568883f64df6cf0b04305d23bd49d615.tar.gz rails-8f35fcec568883f64df6cf0b04305d23bd49d615.tar.bz2 rails-8f35fcec568883f64df6cf0b04305d23bd49d615.zip |
Put test-case dependent helper Class inside the test case
This fixes :warning: previous definition of download was here
Diffstat (limited to 'activesupport/test/multibyte_conformance_test.rb')
-rw-r--r-- | activesupport/test/multibyte_conformance_test.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/activesupport/test/multibyte_conformance_test.rb b/activesupport/test/multibyte_conformance_test.rb index d493a48fe4..5df8f32e46 100644 --- a/activesupport/test/multibyte_conformance_test.rb +++ b/activesupport/test/multibyte_conformance_test.rb @@ -5,25 +5,25 @@ require 'fileutils' require 'open-uri' require 'tmpdir' -class Downloader - def self.download(from, to) - unless File.exist?(to) - unless File.exist?(File.dirname(to)) - system "mkdir -p #{File.dirname(to)}" - end - open(from) do |source| - File.open(to, 'w') do |target| - source.each_line do |l| - target.write l +class MultibyteConformanceTest < ActiveSupport::TestCase + class Downloader + def self.download(from, to) + unless File.exist?(to) + unless File.exist?(File.dirname(to)) + system "mkdir -p #{File.dirname(to)}" + end + open(from) do |source| + File.open(to, 'w') do |target| + source.each_line do |l| + target.write l + end end end end + true end - true end -end -class MultibyteConformanceTest < ActiveSupport::TestCase include MultibyteTestHelpers UNIDATA_URL = "http://www.unicode.org/Public/#{ActiveSupport::Multibyte::Unicode::UNICODE_VERSION}/ucd" |