Sha256: e348c61dd696657612188f667567a0e2dea25a596cca6fa76e2a4c1b418ba311

Contents?: true

Size: 472 Bytes

Versions: 1

Compression:

Stored size: 472 Bytes

Contents

require 'spec_helper'

describe Shoulda::Matchers::ActiveModel::RequireAValidDomainNameMatcher 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

1 entries across 1 versions & 1 rubygems

Version Path
validates_host-1.0.0 spec/validates_host/require_a_valid_domain_name_matcher_spec.rb