Sha256: 533f7a711b50a675a6f01a88bdadcd375e9e8770200ed56a2c1ff88254a00f66

Contents?: true

Size: 573 Bytes

Versions: 15

Compression:

Stored size: 573 Bytes

Contents

# -*- coding: utf-8 -*-

require 'spec_helper'
require 'integration/duplicated_validations/spec_helper'

describe 'DataMapper::Validations::Fixtures::Page' do
  before :all do
    DataMapper::Validations::Fixtures::Page.auto_migrate!

    @model = DataMapper::Validations::Fixtures::Page.new(:id => 1024)
  end

  describe "without body" do
    before :all do
      @model.body = nil
    end

    it_should_behave_like "invalid model"

    it "does not have duplicated error messages" do
      @model.errors.on(:body).should == ["Body must not be blank"]
    end
  end
end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
ardm-validations-1.2.0 spec/integration/duplicated_validations/duplicated_validations_spec.rb
aequitas-0.0.1 spec_legacy/integration/duplicated_validations/duplicated_validations_spec.rb
dm-validations-1.2.0 spec/integration/duplicated_validations/duplicated_validations_spec.rb
dm-validations-1.2.0.rc2 spec/integration/duplicated_validations/duplicated_validations_spec.rb
dm-validations-1.2.0.rc1 spec/integration/duplicated_validations/duplicated_validations_spec.rb
dm-validations-1.1.0 spec/integration/duplicated_validations/duplicated_validations_spec.rb
dm-validations-1.1.0.rc3 spec/integration/duplicated_validations/duplicated_validations_spec.rb
dm-validations-1.1.0.rc2 spec/integration/duplicated_validations/duplicated_validations_spec.rb
dm-validations-1.1.0.rc1 spec/integration/duplicated_validations/duplicated_validations_spec.rb
dm-validations-1.0.2 spec/integration/duplicated_validations/duplicated_validations_spec.rb
dm-validations-1.0.1 spec/integration/duplicated_validations/duplicated_validations_spec.rb
dm-validations-1.0.0 spec/integration/duplicated_validations/duplicated_validations_spec.rb
dm-validations-1.0.0.rc3 spec/integration/duplicated_validations/duplicated_validations_spec.rb
dm-validations-1.0.0.rc2 spec/integration/duplicated_validations/duplicated_validations_spec.rb
dm-validations-1.0.0.rc1 spec/integration/duplicated_validations/duplicated_validations_spec.rb