Sha256: fddbbd4559ba41c1917d31a95910ced24fd3191206919749d7907a926ee1d03b
Contents?: true
Size: 565 Bytes
Versions: 2
Compression:
Stored size: 565 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Shoulda::Matchers::ActiveModel::RequireAValidSubnetMatcher do let(:subnet) { Subnet.new } it 'accepts on value' do expect(subnet).to require_a_valid_subnet(:value) end it 'accepts without a specified attribute' do expect(subnet).to require_a_valid_subnet end it 'rejects on id' do expect(subnet).not_to require_a_valid_subnet(:id) end it 'has a description message' do expect(require_a_valid_subnet.description).to eq('require value to be a valid subnet') end end
Version data entries
2 entries across 2 versions & 1 rubygems