Sha256: 6f09655567763b43e2a7c8e1ce1ce66350b0be89758fb4aa42493c9e9279e2b7

Contents?: true

Size: 632 Bytes

Versions: 18

Compression:

Stored size: 632 Bytes

Contents

require 'spec_helper'

describe Danica::Operator::Power do
  let(:variables) { [2, 4] }
  subject { described_class.new(*variables) }

  it_behaves_like 'an object that respond to basic_methods'
  it_behaves_like 'an object with basic operation'

  it_behaves_like 'a operator that has two terms', :power, {
    values: [ 3, 2 ],
    calculated: 9.0,
    to_tex: {
      string_expected: 'X1^{X2}',
      numeric_string_expected: '3^{2}',
      partial_string_expected: '3^{X2}'
    },
    to_gnu: {
      string_expected: 'X1**(X2)',
      numeric_string_expected: '3**(2)',
      partial_string_expected: '3**(X2)'
    }
  }
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
danica-2.7.4 spec/lib/danica/operator/power_spec.rb
danica-2.7.3 spec/lib/danica/operator/power_spec.rb
danica-2.7.2 spec/lib/danica/operator/power_spec.rb
danica-2.7.1 spec/lib/danica/operator/power_spec.rb
danica-2.6.4 spec/lib/danica/operator/power_spec.rb
danica-2.6.3 spec/lib/danica/operator/power_spec.rb
danica-2.6.2 spec/lib/danica/operator/power_spec.rb
danica-2.6.1 spec/lib/danica/operator/power_spec.rb
danica-2.6.0 spec/lib/danica/operator/power_spec.rb
danica-2.5.1 spec/lib/danica/operator/power_spec.rb
danica-2.5.0 spec/lib/danica/operator/power_spec.rb
danica-2.4.4 spec/lib/danica/operator/power_spec.rb
danica-2.4.3 spec/lib/danica/operator/power_spec.rb
danica-2.4.2 spec/lib/danica/operator/power_spec.rb
danica-2.4.1 spec/lib/danica/operator/power_spec.rb
danica-2.4.0 spec/lib/danica/operator/power_spec.rb
danica-2.3.1 spec/lib/danica/operator/power_spec.rb
danica-2.3.0 spec/lib/danica/operator/power_spec.rb