Sha256: 23178c53369eaa86c732567b3a0d11587b8c09ecad51fbe4af646c7cb51fd185

Contents?: true

Size: 535 Bytes

Versions: 6

Compression:

Stored size: 535 Bytes

Contents

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

6 entries across 6 versions & 1 rubygems

Version Path
mongoid-0.6.10 spec/unit/mongoid/extensions/boolean/conversions_spec.rb
mongoid-0.6.9 spec/unit/mongoid/extensions/boolean/conversions_spec.rb
mongoid-0.6.8 spec/unit/mongoid/extensions/boolean/conversions_spec.rb
mongoid-0.6.7 spec/unit/mongoid/extensions/boolean/conversions_spec.rb
mongoid-0.6.6 spec/unit/mongoid/extensions/boolean/conversions_spec.rb
mongoid-0.6.5 spec/unit/mongoid/extensions/boolean/conversions_spec.rb