require "spec_helper" RSpec.describe "or operator" do let(:timeout) { 0 } subject { Code.evaluate(input, timeout: timeout).to_s } [ ["true || false", "true"], ["false || false", "false"] ].each do |input, output| context input do let(:input) { input } it { expect(subject).to eq(output) } end end end