File: underscore_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 (21 lines) | stat: -rw-r--r-- 637 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'spec_helper'

describe Inflecto do
  describe '.underscore' do
    it 'underscores DataMapper as data_mapper' do
      Inflecto.underscore('DataMapper').should == 'data_mapper'
    end

    it 'underscores Merb as merb' do
      Inflecto.underscore('Merb').should == 'merb'
    end

    it 'underscores DataMapper::Resource as data_mapper/resource' do
      Inflecto.underscore('DataMapper::Resource').should == 'data_mapper/resource'
    end

    it 'underscores Merb::BootLoader::Rackup as merb/boot_loader/rackup' do
      Inflecto.underscore('Merb::BootLoader::Rackup').should == 'merb/boot_loader/rackup'
    end
  end
end