Idea: Write constraints in separate modules and then include the modules in the respective place. =begin it 'should handle disjunction being constraint to be true' do @bools.disjunction.must_be.true @model.solve! @bools.any?{ |b| b.true? }.should be_true end it 'should handle disjunction being constraint to be false' do @bools.disjunction.must_be.false @model.solve! @bools.all?{ |b| b.false? }.should be_true end =end