Sha256: f78b94683a8d29c45c99af1d40eb7961f560f006081be61489f4ab72ed2c4262

Contents?: true

Size: 517 Bytes

Versions: 11

Compression:

Stored size: 517 Bytes

Contents

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

describe Mongoid::Extensions::Boolean::Conversions do

  describe "#set" do

    context "when 'true'" do

      it "returns true" do
        Boolean.set("true").should be_true
      end

    end

    context "when 'false'" do

      it "returns false" do
        Boolean.set("false").should be_false
      end

    end

  end

  describe "#get" do

    it "returns the boolean" do
      Boolean.get(false).should be_false
    end

  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mongoid-0.6.4 spec/unit/mongoid/extensions/boolean/conversions_spec.rb
mongoid-0.6.3 spec/unit/mongoid/extensions/boolean/conversions_spec.rb
mongoid-0.6.2 spec/unit/mongoid/extensions/boolean/conversions_spec.rb
mongoid-0.6.1 spec/unit/mongoid/extensions/boolean/conversions_spec.rb
mongoid-0.6.0 spec/unit/mongoid/extensions/boolean/conversions_spec.rb
mongoid-0.5.11 spec/unit/mongoid/extensions/boolean/conversions_spec.rb
mongoid-0.5.10 spec/unit/mongoid/extensions/boolean/conversions_spec.rb
mongoid-0.5.9 spec/unit/mongoid/extensions/boolean/conversions_spec.rb
mongoid-0.5.8 spec/unit/mongoid/extensions/boolean/conversions_spec.rb
mongoid-0.5.7 spec/unit/mongoid/extensions/boolean/conversions_spec.rb
mongoid-0.5.6 spec/unit/mongoid/extensions/boolean/conversions_spec.rb