Sha256: 20e40e2f3795cbb48051bc8c503c85f5657a071cc71731fdf3e91159a7f15c9c
Contents?: true
Size: 597 Bytes
Versions: 2
Compression:
Stored size: 597 Bytes
Contents
# encoding: CP1251 require 'rspec' describe 'RSpec' do it 'correctly outputs Windows Cyrillics' do pending 'RSpec does NOT output Windows Cyrillics, unless `chcp 1251` is run in console' Encoding.default_internal, Encoding.default_external = ['cp1251'] * 2 lit = "Широкая электрификация южных губерний даст мощный толчок подъёму сельс" puts "Source encoding: #{__ENCODING__}" puts "Def ext/int encoding: #{Encoding.default_external}/#{Encoding.default_internal}" puts "String literal: #{lit} - encoding: #{lit.encoding}" lit.should == :miserable_failure end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
p2ruby-0.1.5 | spec/encoding_spec.rb |
p2ruby-0.1.4 | spec/encoding_spec.rb |