Sha256: f2c285d85f548f251cbb22b910b290e9d0d365ec1cd3cac082735b4d9b6fb4ba
Contents?: true
Size: 631 Bytes
Versions: 2
Compression:
Stored size: 631 Bytes
Contents
require_relative '../../../spec_helper' require_relative '../../shared/macros/integration_spec' require 'aequitas' Aequitas::Macros::IntegrationSpec.describe Aequitas::Macros, '#validates_with_block' do before do block_value = self.block_value class_under_test.validates_with_block(attribute_name) { block_value } end let(:attribute_value) { MiniTest::Mock.new } describe 'when block returns a truthy value' do let(:block_value) { true } it_should_be_a_valid_instance end describe 'when block returns a falsy value' do let(:block_value) { false } it_should_be_an_invalid_instance end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aequitas-0.0.2 | spec/integration/aequitas/macros/validates_with_block.rb |
aequitas-0.0.1 | spec/integration/aequitas/macros/validates_with_block.rb |