Sha256: 26d6e9ee6f926620ffeae859182f6b84335d7a1893e828806b52c16a79ed3c6b
Contents?: true
Size: 983 Bytes
Versions: 20
Compression:
Stored size: 983 Bytes
Contents
require 'spec_helper' describe 'Plural cache' do it 'caches pluralizations' do cache = Paperclip::Interpolations::PluralCache.new symbol = :box first = cache.pluralize_symbol(symbol) second = cache.pluralize_symbol(symbol) expect(first).to equal(second) end it 'caches pluralizations and underscores' do class BigBox ; end cache = Paperclip::Interpolations::PluralCache.new klass = BigBox first = cache.underscore_and_pluralize_class(klass) second = cache.underscore_and_pluralize_class(klass) expect(first).to equal(second) end it 'pluralizes words' do cache = Paperclip::Interpolations::PluralCache.new symbol = :box expect(cache.pluralize_symbol(symbol)).to eq("boxes") end it 'pluralizes and underscore class names' do class BigBox ; end cache = Paperclip::Interpolations::PluralCache.new klass = BigBox expect(cache.underscore_and_pluralize_class(klass)).to eq("big_boxes") end end
Version data entries
20 entries across 20 versions & 5 rubygems