Sha256: 48d7054669aa2adb3f300f80832c01dbc112025716ed5eb3d693a462a8a59c80
Contents?: true
Size: 930 Bytes
Versions: 7
Compression:
Stored size: 930 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' describe Twitter::Unicode do it "should lazy-init constants" do Twitter::Unicode.const_defined?(:UFEB6).should == false Twitter::Unicode::UFEB6.should_not be_nil Twitter::Unicode::UFEB6.should be_kind_of(String) Twitter::Unicode.const_defined?(:UFEB6).should == true end it "should return corresponding character" do Twitter::Unicode::UFEB6.should == [0xfeb6].pack('U') end it "should allow lowercase notation" do Twitter::Unicode::Ufeb6.should == Twitter::Unicode::UFEB6 Twitter::Unicode::Ufeb6.should === Twitter::Unicode::UFEB6 end it "should allow underscore notation" do Twitter::Unicode::U_FEB6.should == Twitter::Unicode::UFEB6 Twitter::Unicode::U_FEB6.should === Twitter::Unicode::UFEB6 end it "should raise on invalid codepoints" do lambda { Twitter::Unicode::FFFFFF }.should raise_error(NameError) end end
Version data entries
7 entries across 7 versions & 1 rubygems