Sha256: b8bf55d4a883ce2b8de18d769f480d1466b771bab55b1195a2db63535ff035ce

Contents?: true

Size: 509 Bytes

Versions: 1

Compression:

Stored size: 509 Bytes

Contents

require 'spec_helper'

describe UniversalValidators::MacAddressValidator do
  describe '.valid?' do
    context 'with valid mac address' do
      it "return true" do
        mac = UniversalValidators::MacAddressValidator.new('00:0A:CD:00:CC:FE')
        expect(mac).to be_valid
      end
    end

    context 'with invalid mac address' do
      it "return false" do
        mac = UniversalValidators::MacAddressValidator.new('00:0A:CD:00:CC:FG')
        expect(mac).to_not be_valid
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
universal_validators-1.0.0 spec/mac_address_validator_spec.rb