File: demodulize_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 (13 lines) | stat: -rw-r--r-- 353 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'spec_helper'

describe Inflecto do
  describe '.demodulize' do
    it 'demodulizes module name: DataMapper::Inflecto => Inflecto' do
      Inflecto.demodulize('DataMapper::Inflecto').should == 'Inflecto'
    end

    it 'demodulizes module name: A::B::C::D::E => E' do
      Inflecto.demodulize('A::B::C::D::E').should == 'E'
    end
  end
end