Sha256: 61cdbcecca885a96453162aaf0549f7780bb259870d7026719e55349aedeb9dd

Contents?: true

Size: 687 Bytes

Versions: 3

Compression:

Stored size: 687 Bytes

Contents

require 'spec_helper'

describe HentryConsumer::FormatRules do
  before do
    stub_const("HentryConsumer::FormatRules::REQUIRED", [:url])
    stub_const("HentryConsumer::FormatRules::UNIQUE", [:uid])
  end

  it "stubs correctly" do
    HentryConsumer::FormatRules::REQUIRED.should include :url
  end

  it "is required" do
    HentryConsumer::FormatRules.required?(:url).should be_true
  end

  it "can have many" do
    HentryConsumer::FormatRules.can_have_many?(:url).should be_true
  end

  it "can't have many" do
    HentryConsumer::FormatRules.can_have_many?(:uid).should be_false
  end

  it "is unique" do
    HentryConsumer::FormatRules.unique?(:uid).should be_true
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hentry_consumer-0.8.3 spec/lib/hentry_consumer/format_rules_spec.rb
hentry_consumer-0.8.2 spec/lib/hentry_consumer/format_rules_spec.rb
hentry_consumer-0.8.1 spec/lib/hentry_consumer/format_rules_spec.rb