Sha256: d0d541a4fec185aa4a73cce7eb12330f2806c286810f2cb8bc109a312f4e9212

Contents?: true

Size: 687 Bytes

Versions: 27

Compression:

Stored size: 687 Bytes

Contents

require File.expand_path(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

27 entries across 27 versions & 1 rubygems

Version Path
mongoid-0.8.10 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.8.9 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.8.8 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.8.7 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.8.6 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.8.5 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.8.4 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.8.3 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.8.2 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.8.1 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.7.10 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.7.9 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.7.8 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.7.7 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.7.6 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.7.5 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.7.4 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.7.3 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.7.2 spec/unit/mongoid/extensions/string/inflections_spec.rb
mongoid-0.7.1 spec/unit/mongoid/extensions/string/inflections_spec.rb