Sha256: 6bb3b54ff5f8f36e381451af60d3f45bbf6076d58b84c025ef1b45621b8e3b99

Contents?: true

Size: 486 Bytes

Versions: 4

Compression:

Stored size: 486 Bytes

Contents

require 'spec_helper'
require 'shoulda-matchers'

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

  it "should accept on domain_name" do
    @server.should require_a_valid_domain_name(:domain_name)
  end

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

  it "should reject on host_name" do
    @server.should_not require_a_valid_domain_name(:host_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/domain_name_matcher_spec.rb
validates_host-0.3.0 spec/validates_host/shoulda-matchers/domain_name_matcher_spec.rb
validates_host-0.2.0 spec/validates_host.rb/shoulda-matchers/domain_name_matcher_spec.rb
validates_host-0.1.0 spec/validates_host.rb/shoulda-matchers/domain_name_matcher_spec.rb