Sha256: 41a188883afd4997c7f6b2d59fb69d4904be96ce6673d91ceb64010c62473e21

Contents?: true

Size: 484 Bytes

Versions: 1

Compression:

Stored size: 484 Bytes

Contents

require 'spec_helper'

describe Cellularity::Esn do

  let(:invalid_esn)  { ['blah', 12345, :abcdfeghj, '0x123456'] }
  let(:valid_esn)    { [12345678909, '0xabc12345', 'abc12345', '01234567890'] }

  it 'should think that valid esns are, in fact, valid' do
    valid_esn.each { |esn| Cellularity::Esn.new(esn).valid?.should be_true }
  end

  it 'should think that invalid esns are invalid' do
    invalid_esn.each { |esn| Cellularity::Esn.new(esn).valid?.should be_false }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cellularity-1.0.0 spec/esn_spec.rb