[ruby/prism] Pop lex mode for heredocs in the lexer, not the parser
[ruby.git] / spec / ruby / command_line / dash_external_encoding_spec.rb
blobf052674dc870f6be7b739f41b9fb9618aa77fc24
1 require_relative '../spec_helper'
3 describe 'The --external-encoding command line option sets Encoding.default_external' do
4   before :each do
5     @test_string = "print Encoding.default_external.name"
6   end
8   it "if given an encoding with an =" do
9     ruby_exe(@test_string, options: '--external-encoding=big5').should == Encoding::Big5.name
10   end
12   it "if given an encoding as a separate argument" do
13     ruby_exe(@test_string, options: '--external-encoding big5').should == Encoding::Big5.name
14   end
15 end