Sha256: 01f8ba74c2fb95f3499e0c63c3075bb7698dd7d83e30e7aceaa0a8880aefd7e5

Contents?: true

Size: 441 Bytes

Versions: 2

Compression:

Stored size: 441 Bytes

Contents

require 'spec_helper'
require 'shoulda-matchers'

describe Shoulda::Matchers::ActiveModel::SubnetMatcher do
  before :each do
    @subnet = Subnet.new
  end

  it "should accept on value" do
    @subnet.should require_a_valid_subnet(:value)
  end

  it "should accept without a specified attribute" do
    @subnet.should require_a_valid_subnet
  end

  it "should reject on id" do
    @subnet.should_not require_a_valid_subnet(:id)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
validates_host-0.3.1 spec/validates_host/shoulda-matchers/subnet_matcher_spec.rb
validates_host-0.3.0 spec/validates_host/shoulda-matchers/subnet_matcher_spec.rb