Sha256: 52c47f17dae391491f29681239619478a9da827029f2cf6ac0398f9ad5f37b3f

Contents?: true

Size: 464 Bytes

Versions: 1

Compression:

Stored size: 464 Bytes

Contents

require 'spec_helper'

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

  it "should accept on host_name" do
    @server.should require_a_valid_host_name(:host_name)
  end

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

  it "should reject on domain_name" do
    @server.should_not require_a_valid_host_name(:domain_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_host_name_matcher_spec.rb