Sha256: bcc69911ad056f79b20edf6b7510c32fccbdb7c464d14ccad28d67d54269b253

Contents?: true

Size: 1010 Bytes

Versions: 34

Compression:

Stored size: 1010 Bytes

Contents

require File.join(File.dirname(File.expand_path(__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.must_equal []
    Sequel.inflections.plural('blah', 'blahs')
    Sequel.inflections.clear
    Sequel.inflections.plurals.must_equal []
    Sequel.inflections.singulars.must_equal []
    Sequel.inflections.uncountables.must_equal []
  end

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

Version data entries

34 entries across 32 versions & 2 rubygems

Version Path
sequel-4.49.0 spec/model/inflector_spec.rb
sequel-4.48.0 spec/model/inflector_spec.rb
tdiary-5.0.5 vendor/bundle/gems/sequel-4.44.0/spec/model/inflector_spec.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/sequel-4.44.0/spec/model/inflector_spec.rb
tdiary-5.0.5 vendor/bundle/gems/sequel-4.47.0/spec/model/inflector_spec.rb
sequel-4.47.0 spec/model/inflector_spec.rb
sequel-4.46.0 spec/model/inflector_spec.rb
sequel-4.45.0 spec/model/inflector_spec.rb
tdiary-5.0.4 vendor/bundle/gems/sequel-4.44.0/spec/model/inflector_spec.rb
sequel-4.44.0 spec/model/inflector_spec.rb
sequel-4.43.0 spec/model/inflector_spec.rb
sequel-4.42.1 spec/model/inflector_spec.rb
sequel-4.42.0 spec/model/inflector_spec.rb
sequel-4.41.0 spec/model/inflector_spec.rb
sequel-4.40.0 spec/model/inflector_spec.rb
sequel-4.39.0 spec/model/inflector_spec.rb
tdiary-5.0.2 vendor/bundle/gems/sequel-4.37.0/spec/model/inflector_spec.rb
sequel-4.38.0 spec/model/inflector_spec.rb
sequel-4.37.0 spec/model/inflector_spec.rb
sequel-4.36.0 spec/model/inflector_spec.rb