Sha256: 70e5b7a34c80c5ed85483c145391957a908e82cce50da73a8e78a16bb42be15d

Contents?: true

Size: 387 Bytes

Versions: 1

Compression:

Stored size: 387 Bytes

Contents

require 'spec_helper'

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

  let(:klass)  { Attribute::Integer }
  let(:object) { klass.new(:id)     }

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

    it { should be(true) }
  end

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

    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/valid_primitive_spec.rb