bcardarella / valid_attribute

Minimalist validation BDD for ActiveModel specs
178 stars 18 forks source link

support 'not' #25

Closed bcardarella closed 5 years ago

bcardarella commented 11 years ago

Proposed API

it { should have_valid(:name).when('Brian').not(nil, '') }

Double negatives won't be supported. For example, this will not work:

it { should_not have_valid(:name).when(nil, '').not('Brian') }