Sha256: 47e0bbd0822c02a0f916b6e2f20c369a4d431c0c7c5972c073bad38eef2344d7

Contents?: true

Size: 913 Bytes

Versions: 1

Compression:

Stored size: 913 Bytes

Contents

#coding:utf-8
require File.dirname(__FILE__) + '/spec_helper.rb'
describe SFCRoom do
  include SFCRoom::Utils
  describe 'Utils' do
    down = 'αβγδεζηθικλμνξοπρςστυφχψω'
    up   = 'ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ΢ΣΤΥΦΧΨΩ'
    other = 'hogehogeほげほげ'
    it 'can convert downcase greek to upcase ' do
      str = SFCRoom::Utils.greek_upcase(down)
      str.should eql(up)
    end
    it 'can convert upcase greek to downcase ' do
      str = SFCRoom::Utils.greek_downcase(up)
      str.should eql(down)
    end
    it 'not effect to other characters' do
      str = SFCRoom::Utils.greek_downcase(other)
      str.should eql(other)
      str = SFCRoom::Utils.greek_upcase(other)
      str.should eql(other)
      str = SFCRoom::Utils.greek_upcase(up)
      str.should eql(up)
      str = SFCRoom::Utils.greek_downcase(down)
      str.should eql(down)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sfc-room-0.0.1 spec/utils_spec.rb