File: classify_spec.rb

package info (click to toggle)
ruby-inflecto 0.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 236 kB
  • sloc: ruby: 691; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 461 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'spec_helper'

describe Inflecto, '.classify' do
  it 'classifies data_mapper as DataMapper' do
    Inflecto.classify('data_mapper').should == 'DataMapper'
  end

  it 'classifies enlarged_testes as EnlargedTestis' do
    Inflecto.classify('enlarged_testes').should == 'EnlargedTestis'
  end

  it 'singularizes string first: classifies data_mappers as egg_and_hams as EggAndHam' do
    Inflecto.classify('egg_and_hams').should == 'EggAndHam'
  end
end