Sha256: adb7c9101c0a54ac140bf6c4277cae89a3b0b9e8b88c069b802464397426d020

Contents?: true

Size: 366 Bytes

Versions: 21

Compression:

Stored size: 366 Bytes

Contents

require "spec_helper"

RSpec.describe "multiplication" do
  let(:timeout) { 0 }
  subject { Code.evaluate(input, timeout: timeout).to_s }

  [
    ["2 * 3", "6"],
    ["2 * 3 + 2", "8"],
    ["2 / 4", "0.5"],
    ["4 % 3", "1"]
  ].each do |input, output|
    context input do
      let(:input) { input }
      it { expect(subject).to eq(output) }
    end
  end
end

Version data entries

21 entries across 21 versions & 3 rubygems

Version Path
template-ruby-0.5.6 spec/code/multiplication_spec.rb
language-ruby-0.5.6 spec/code/multiplication_spec.rb
code-ruby-0.5.6 spec/code/multiplication_spec.rb
template-ruby-0.5.5 spec/code/multiplication_spec.rb
language-ruby-0.5.5 spec/code/multiplication_spec.rb
code-ruby-0.5.5 spec/code/multiplication_spec.rb
template-ruby-0.5.4 spec/code/multiplication_spec.rb
language-ruby-0.5.4 spec/code/multiplication_spec.rb
code-ruby-0.5.4 spec/code/multiplication_spec.rb
template-ruby-0.5.3 spec/code/multiplication_spec.rb
language-ruby-0.5.3 spec/code/multiplication_spec.rb
code-ruby-0.5.3 spec/code/multiplication_spec.rb
template-ruby-0.5.2 spec/code/multiplication_spec.rb
language-ruby-0.5.2 spec/code/multiplication_spec.rb
code-ruby-0.5.2 spec/code/multiplication_spec.rb
language-ruby-0.5.1 spec/code/multiplication_spec.rb
template-ruby-0.5.1 spec/code/multiplication_spec.rb
code-ruby-0.5.1 spec/code/multiplication_spec.rb
template-ruby-0.5.0 spec/code/multiplication_spec.rb
language-ruby-0.5.0 spec/code/multiplication_spec.rb