Sha256: 2936af2ae85ee56b4f1d7503ea664b465cc85de9c3ce8f20f4214a6da4effe9b

Contents?: true

Size: 954 Bytes

Versions: 6

Compression:

Stored size: 954 Bytes

Contents

# encoding: utf-8
require File.dirname(__FILE__) + '/spec_helper.rb'

describe RandomText do
  it "should create RandomText objects for each text file" do
    Dir.glob(File.join(File.dirname(__FILE__), '..', 'resources', '*.txt')) do |path|
      RandomText.const_get(RandomText.classify(File.basename(path, File.extname(path)))).class.should == RandomText::Dictionary
    end
  end

  it "should classify" do
    RandomText.classify('hello_world').should == 'HelloWorld'
  end

  it "should downcase" do
    RandomText.downcase('ABCDEFGHIJKLMNOPQRSTUVWXYZ-АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ:abcdefghijklmnopqrstuvwxyz-абвгдеёжзийклмнопрстуфхцчшщъыьэюя').should ==
                        'abcdefghijklmnopqrstuvwxyz-абвгдеёжзийклмнопрстуфхцчшщъыьэюя:abcdefghijklmnopqrstuvwxyz-абвгдеёжзийклмнопрстуфхцчшщъыьэюя'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
random_text-1.1.0 spec/random_text_spec.rb
random_text-1.0.2.2 spec/random_text_spec.rb
random_text-1.0.2.1 spec/random_text_spec.rb
random_text-1.0.2 spec/random_text_spec.rb
random_text-1.0.1 spec/random_text_spec.rb
random_text-1.0.0 spec/random_text_spec.rb