Sha256: 8b1a5faf8b5f8a418eb62bdbd9e069095f66c2c24599e0f26ceaa3ee3dff5a41

Contents?: true

Size: 653 Bytes

Versions: 1

Compression:

Stored size: 653 Bytes

Contents

RSpec.describe WannabeBool::Boolean do
  context TrueClass do
    subject { true }

    describe '#to_b' do
      it { expect(subject.to_b).to be true }
    end

    describe '#to_bool' do
      it { expect(subject.to_bool).to be true }
    end

    describe '#to_boolean' do
      it { expect(subject.to_boolean).to be true }
    end
  end

  context FalseClass do
    subject { false }

    describe '#to_b' do
      it { expect(subject.to_b).to be false }
    end

    describe '#to_bool' do
      it { expect(subject.to_bool).to be false }
    end

    describe '#to_boolean' do
      it { expect(subject.to_boolean).to be false }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wannabe_bool-0.7.0 spec/wannabe_bool/boolean_spec.rb