Skip to content

Commit

Permalink
FIXES cucumber#94 for Rust programming language
Browse files Browse the repository at this point in the history
    * Not.to_s()  -- to_string conversion
  • Loading branch information
jenisys committed May 29, 2023
1 parent c330779 commit fc02b8d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ruby/lib/cucumber/tag_expressions/expressions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ def evaluate(variables)
end

def to_s
"not ( #{@expression} )"
if @expression.is_a?(And)|| @expression.is_a?(Or)
# -- HINT: Binary operatos provides already "( ... )"
"not #{@expression}"
else
"not ( #{@expression} )"
end
end
end

Expand Down

0 comments on commit fc02b8d

Please sign in to comment.