aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/multibyte_conformance_test.rb
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2016-01-24 23:22:14 +0900
committerAkira Matsuda <ronnie@dio.jp>2016-01-24 23:37:26 +0900
commit8f35fcec568883f64df6cf0b04305d23bd49d615 (patch)
tree5349d6ed140426b68e8aeaffdd32f9895dc0f691 /activesupport/test/multibyte_conformance_test.rb
parentbd2178f1153a050cf9bcd4e311ea93fe9ba7506f (diff)
downloadrails-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.rb26
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"