Skip to content

Commit

Permalink
operand test
Browse files Browse the repository at this point in the history
  • Loading branch information
omkarmoghe committed Mar 30, 2024
1 parent 12b1482 commit e0d34e6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
portable_expressions (0.1.0)
portable_expressions (0.1.1)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -40,8 +40,8 @@ PLATFORMS
ruby

DEPENDENCIES
portable_expressions!
minitest (~> 5.16)
portable_expressions!
rake (~> 13.0)
rubocop (~> 1.21)

Expand Down
13 changes: 13 additions & 0 deletions test/models/test_operand.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

class TestOperand < Minitest::Test
def test_and
operands = [PortableExpressions::Operand.new(true), PortableExpressions::Operand.new(true)]
assert(operands.reduce(:and))
end

def test_or
operands = [PortableExpressions::Operand.new(true), PortableExpressions::Operand.new(false)]
assert(operands.reduce(:or))
end
end

0 comments on commit e0d34e6

Please sign in to comment.