Sha256: 82263643271568981ffdd1f8a1746fe92c6a29b1b9c5c2e3ca9c69631e13c3e7

Contents?: true

Size: 467 Bytes

Versions: 1

Compression:

Stored size: 467 Bytes

Contents

# encoding: UTF-8

require 'spec_helper'

describe "Monkey Patches" do
  it "should add a to_unicode_points method to String" do
    "hello unicode".should respond_to(:to_unicode_points)
  end
  
  it "should give the unicode code points for each character in a string" do
    "ab".to_unicode_points.should == ["0061", "0062"]
    tonos = "ί"
    tonos.to_unicode_points.should == ["03af"]
    oxia = "ί"
    oxia.to_unicode_points.should == ["1f77"]    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rgreek-0.1.0 spec/monkey_patches_spec.rb