Sha256: ca504dc76ed7d540b59c25e995af78b7f1c0083d19217848388f794d09e8ca56
Contents?: true
Size: 979 Bytes
Versions: 2
Compression:
Stored size: 979 Bytes
Contents
# encoding: utf-8 require File.dirname(__FILE__) + '/spec_helper' describe Incollege::Unicode do it "should lazy-init constants" do Incollege::Unicode.const_defined?(:UFEB6).should == false Incollege::Unicode::UFEB6.should_not be_nil Incollege::Unicode::UFEB6.should be_kind_of(String) Incollege::Unicode.const_defined?(:UFEB6).should == true end it "should return corresponding character" do Incollege::Unicode::UFEB6.should == [0xfeb6].pack('U') end it "should allow lowercase notation" do Incollege::Unicode::Ufeb6.should == Incollege::Unicode::UFEB6 Incollege::Unicode::Ufeb6.should === Incollege::Unicode::UFEB6 end it "should allow underscore notation" do Incollege::Unicode::U_FEB6.should == Incollege::Unicode::UFEB6 Incollege::Unicode::U_FEB6.should === Incollege::Unicode::UFEB6 end it "should raise on invalid codepoints" do lambda { Incollege::Unicode::FFFFFF }.should raise_error(NameError) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
incollege-text-1.12.1 | spec/unicode_spec.rb |
incollege-text-1.12.0 | spec/unicode_spec.rb |