spec/unit/aequitas/violation_set_spec.rb in aequitas-0.0.1 vs spec/unit/aequitas/violation_set_spec.rb in aequitas-0.0.2
- old
+ new
@@ -16,10 +16,10 @@
describe '#on' do
let(:violation) { Violation.new(object, 'message', nil, :attribute) }
it 'returns nil when no error is present on the requested attribute' do
- assert_nil violation_set.on(:foo)
+ assert_predicate violation_set.on(:foo), :empty?
end
describe 'after adding a message via a symbol attribute name' do
it 'returns the message that was added (as a Violation)' do
violation_set.add(:attribute, 'message')