Sha256: 8638b2300a4ca88004608a09a6771af802afd4f5fcce9eaa25b61e8542dff0d2

Contents?: true

Size: 437 Bytes

Versions: 4

Compression:

Stored size: 437 Bytes

Contents

require 'spec_helper'
require 'shoulda-matchers'

describe Shoulda::Matchers::ActiveModel::IpMatcher do
  before :each do
    @server = Server.new
  end

  it "should accept on ip" do
    @server.should require_a_valid_ip(:ip)
  end

  it "should accept without a specified attribute" do
    @server.should require_a_valid_ip
  end

  it "should reject on domain_name" do
    @server.should_not require_a_valid_ip(:domain_name)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
validates_host-0.3.1 spec/validates_host/shoulda-matchers/ip_matcher_spec.rb
validates_host-0.3.0 spec/validates_host/shoulda-matchers/ip_matcher_spec.rb
validates_host-0.2.0 spec/validates_host.rb/shoulda-matchers/ip_matcher_spec.rb
validates_host-0.1.0 spec/validates_host.rb/shoulda-matchers/ip_matcher_spec.rb