Sha256: d5cf3769523d9ee548781c6be16eb4e02c3fe4e88af9ce3be53bb021d7cd3d59

Contents?: true

Size: 324 Bytes

Versions: 21

Compression:

Stored size: 324 Bytes

Contents

require "spec_helper"

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

  [["1 + 2", "3"], ["2 - 1", "1"], ["a = 2 - 1 a", "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/addition_spec.rb
language-ruby-0.5.6 spec/code/addition_spec.rb
code-ruby-0.5.6 spec/code/addition_spec.rb
template-ruby-0.5.5 spec/code/addition_spec.rb
language-ruby-0.5.5 spec/code/addition_spec.rb
code-ruby-0.5.5 spec/code/addition_spec.rb
template-ruby-0.5.4 spec/code/addition_spec.rb
language-ruby-0.5.4 spec/code/addition_spec.rb
code-ruby-0.5.4 spec/code/addition_spec.rb
template-ruby-0.5.3 spec/code/addition_spec.rb
language-ruby-0.5.3 spec/code/addition_spec.rb
code-ruby-0.5.3 spec/code/addition_spec.rb
template-ruby-0.5.2 spec/code/addition_spec.rb
language-ruby-0.5.2 spec/code/addition_spec.rb
code-ruby-0.5.2 spec/code/addition_spec.rb
language-ruby-0.5.1 spec/code/addition_spec.rb
template-ruby-0.5.1 spec/code/addition_spec.rb
code-ruby-0.5.1 spec/code/addition_spec.rb
template-ruby-0.5.0 spec/code/addition_spec.rb
language-ruby-0.5.0 spec/code/addition_spec.rb