Sha256: ef64fde62247c312a638545bfea65ae971b39fc3c24d19d3ca22b1793ce7bea4

Contents?: true

Size: 502 Bytes

Versions: 1

Compression:

Stored size: 502 Bytes

Contents

require 'spec_helper'

describe 'Veritas::Attribute::Boolean#valid_value?' do
  subject { object.valid_value?(value) }

  let(:klass)  { Attribute::Boolean  }
  let(:object) { klass.new(:boolean) }

  context 'with a true value' do
    let(:value) { true }

    it { should be(true) }
  end

  context 'with a false value' do
    let(:value) { false }

    it { should be(true) }
  end

  context 'with a value that is not true or false' do
    let(:value) { 1 }

    it { should be(false) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.2 spec/unit/veritas/attribute/boolean/valid_value_spec.rb