Sha256: 0b19912e77657b783a26302a8c5c9b0af0dd219d8906b0ebffc1ca20bc9c7fd2

Contents?: true

Size: 311 Bytes

Versions: 21

Compression:

Stored size: 311 Bytes

Contents

require "spec_helper"

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

  [["2 ** 3", "8"], ["2 ** 3 ** 2", "512"]].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/power_spec.rb
language-ruby-0.5.6 spec/code/power_spec.rb
code-ruby-0.5.6 spec/code/power_spec.rb
template-ruby-0.5.5 spec/code/power_spec.rb
language-ruby-0.5.5 spec/code/power_spec.rb
code-ruby-0.5.5 spec/code/power_spec.rb
template-ruby-0.5.4 spec/code/power_spec.rb
language-ruby-0.5.4 spec/code/power_spec.rb
code-ruby-0.5.4 spec/code/power_spec.rb
template-ruby-0.5.3 spec/code/power_spec.rb
language-ruby-0.5.3 spec/code/power_spec.rb
code-ruby-0.5.3 spec/code/power_spec.rb
template-ruby-0.5.2 spec/code/power_spec.rb
language-ruby-0.5.2 spec/code/power_spec.rb
code-ruby-0.5.2 spec/code/power_spec.rb
language-ruby-0.5.1 spec/code/power_spec.rb
template-ruby-0.5.1 spec/code/power_spec.rb
code-ruby-0.5.1 spec/code/power_spec.rb
template-ruby-0.5.0 spec/code/power_spec.rb
language-ruby-0.5.0 spec/code/power_spec.rb