Sha256: 2671b4b6db8d4efd5d52542ab7519d99d376608dec8dfcafefc4ee1c971b24f3

Contents?: true

Size: 669 Bytes

Versions: 19

Compression:

Stored size: 669 Bytes

Contents

require File.join(File.dirname(__FILE__), "/../../../../spec_helper.rb")

describe Mongoid::Extensions::String::Inflections do

  describe "#singular?" do

    context "when singular" do

      it "returns true" do
        "bat".singular?.should be_true
      end

    end

    context "when plural" do

      it "returns false" do
        "bats".singular?.should be_false
      end

    end

  end

  describe "plural?" do

    context "when singular" do

      it "returns false" do
        "bat".plural?.should be_false
      end

    end

    context "when plural" do

      it "returns true" do
        "bats".plural?.should be_true
      end

    end

  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
mongoid-0.6.4 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.6.3 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.6.2 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.6.1 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.6.0 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.5.11 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.5.10 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.5.9 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.5.8 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.5.7 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.5.6 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.5.5 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.5.4 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.5.3 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.5.2 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.5.1 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.5.0 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.4.8 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.4.7 spec/unit/mongoid/extensions/string/inflections_spec.rb