add validations for boolean attributes

This commit is contained in:
Nihad Abbasov 2012-09-05 03:14:24 -07:00
parent 2680371785
commit 0b559cdece
5 changed files with 11 additions and 3 deletions

View file

@ -9,6 +9,7 @@ describe Milestone do
describe "Validation" do
it { should validate_presence_of(:title) }
it { should validate_presence_of(:project_id) }
it { should ensure_inclusion_of(:closed).in_array([true, false]) }
end
let(:milestone) { Factory :milestone }