diff options
Diffstat (limited to 'spec/ruby/core/argf/read_spec.rb')
-rw-r--r-- | spec/ruby/core/argf/read_spec.rb | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/spec/ruby/core/argf/read_spec.rb b/spec/ruby/core/argf/read_spec.rb index b889605572..bbeef95456 100644 --- a/spec/ruby/core/argf/read_spec.rb +++ b/spec/ruby/core/argf/read_spec.rb @@ -62,26 +62,24 @@ describe "ARGF.read" do end end - with_feature :encoding do - before :each do - @external = Encoding.default_external - @internal = Encoding.default_internal + before :each do + @external = Encoding.default_external + @internal = Encoding.default_internal - Encoding.default_external = Encoding::UTF_8 - Encoding.default_internal = nil - end + Encoding.default_external = Encoding::UTF_8 + Encoding.default_internal = nil + end - after :each do - Encoding.default_external = @external - Encoding.default_internal = @internal - end + after :each do + Encoding.default_external = @external + Encoding.default_internal = @internal + end - it "reads the contents of the file with default encoding" do - Encoding.default_external = Encoding::US_ASCII - argf [@file1_name, @file2_name] do - @argf.read.encoding.should == Encoding::US_ASCII - end + it "reads the contents of the file with default encoding" do + Encoding.default_external = Encoding::US_ASCII + argf [@file1_name, @file2_name] do + @argf.read.encoding.should == Encoding::US_ASCII end end end |