extracted boolean validation logic into stand-alone validator

This commit is contained in:
Hauke Klement
2015-03-18 09:10:58 +01:00
parent 9be0e12990
commit d109663cb9
9 changed files with 40 additions and 7 deletions

View File

@ -28,6 +28,8 @@ describe Exercise do
it 'validates the presence of the public flag' do
expect(exercise.errors[:public]).to be_present
exercise.update(public: false)
expect(exercise.errors[:public]).to be_blank
end
it 'validates the presence of a title' do