Sha256: bd222e632c8080d6b2a63d786a34c1e058fe92511a6f2ea29cbc82625e2684bd

Contents?: true

Size: 986 Bytes

Versions: 15

Compression:

Stored size: 986 Bytes

Contents

require File.join(File.dirname(__FILE__), 'spec_helper')

describe Sequel::Inflections do
  before do
    @plurals, @singulars, @uncountables = Sequel.inflections.plurals.dup, Sequel.inflections.singulars.dup, Sequel.inflections.uncountables.dup
  end
  after do
    Sequel.inflections.plurals.replace(@plurals)
    Sequel.inflections.singulars.replace(@singulars)
    Sequel.inflections.uncountables.replace(@uncountables)
  end

  it "should be possible to clear the list of singulars, plurals, and uncountables" do
    Sequel.inflections.clear(:plurals)
    Sequel.inflections.plurals.should == []
    Sequel.inflections.plural('blah', 'blahs')
    Sequel.inflections.clear
    Sequel.inflections.plurals.should == []
    Sequel.inflections.singulars.should == []
    Sequel.inflections.uncountables.should == []
  end

  it "should be yielded and returned by Sequel.inflections" do
    Sequel.inflections{|i| i.should == Sequel::Inflections}.should == Sequel::Inflections
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
sequel-3.12.1 spec/model/inflector_spec.rb
sequel-3.12.0 spec/model/inflector_spec.rb
sequel-3.11.0 spec/model/inflector_spec.rb
viking-sequel-3.10.0 spec/model/inflector_spec.rb
sequel-3.10.0 spec/model/inflector_spec.rb
sequel-3.9.0 spec/model/inflector_spec.rb
sequel-3.8.0 spec/model/inflector_spec.rb
sequel-3.7.0 spec/model/inflector_spec.rb
sequel-3.6.0 spec/model/inflector_spec.rb
sequel-3.5.0 spec/model/inflector_spec.rb
sequel-3.4.0 spec/model/inflector_spec.rb
sequel-3.2.0 spec/model/inflector_spec.rb
sequel-3.3.0 spec/model/inflector_spec.rb
sequel-3.1.0 spec/model/inflector_spec.rb
sequel-3.0.0 spec/model/inflector_spec.rb