spec/dentaku_spec.rb in dentaku-2.0.10 vs spec/dentaku_spec.rb in dentaku-2.0.11

- old
+ new

@@ -17,6 +17,12 @@ expect(Dentaku('40 + N', 'n' => 2)).to eql(42) expect(Dentaku('40 + N', 'N' => 2)).to eql(42) expect(Dentaku('40 + n', 'N' => 2)).to eql(42) expect(Dentaku('40 + n', 'n' => 2)).to eql(42) end + + it 'raises a parse error for bad logic expressions' do + expect { + Dentaku('true AND') + }.to raise_error(Dentaku::ParseError) + end end