Sha256: 8755d5b7dd9a96fc58072479febc79ad4df0411b2aa10349320287e8109c52db

Contents?: true

Size: 362 Bytes

Versions: 7

Compression:

Stored size: 362 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Function::Numeric::UnaryMinus, '.call' do
  subject { object.call(value) }

  let(:object) { described_class }

  context 'when the value is positive' do
    let(:value) { 1 }

    it { should eql(-1) }
  end

  context 'when the value is negative' do
    let(:value) { -1 }

    it { should eql(1) }
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
axiom-0.2.0 spec/unit/axiom/function/numeric/unary_minus/class_methods/call_spec.rb
axiom-0.1.1 spec/unit/axiom/function/numeric/unary_minus/class_methods/call_spec.rb
axiom-0.1.0 spec/unit/axiom/function/numeric/unary_minus/class_methods/call_spec.rb
veritas-0.0.7 spec/unit/veritas/function/numeric/unary_minus/class_methods/call_spec.rb
veritas-0.0.6 spec/unit/veritas/function/numeric/unary_minus/class_methods/call_spec.rb
veritas-0.0.5 spec/unit/veritas/function/numeric/unary_minus/class_methods/call_spec.rb
veritas-0.0.4 spec/unit/veritas/function/numeric/unary_minus/class_methods/call_spec.rb