Sha256: 3cc3a4108703e7668fc8260db65d0430e288be735ffcb7953dbc6d4d68a9083f

Contents?: true

Size: 533 Bytes

Versions: 2

Compression:

Stored size: 533 Bytes

Contents

require_relative '../../../spec_helper'
require_relative '../../shared/macros/integration_spec'
require 'aequitas'

Aequitas::Macros::IntegrationSpec.describe Aequitas::Macros, '#validates_absence_of' do
  before { class_under_test.validates_absence_of attribute_name }

  describe 'when validated attribute is present' do
    let(:attribute_value) { :foo }

    it_should_be_an_invalid_instance
  end

  describe 'when validated attribute is absent' do
    let(:attribute_value) { nil }

    it_should_be_a_valid_instance
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aequitas-0.0.2 spec/integration/aequitas/macros/validates_absence_of_spec.rb
aequitas-0.0.1 spec/integration/aequitas/macros/validates_absence_of_spec.rb