Sha256: fb6ff139b43db96fa78a197a3deaf8c07d1076c0524a871452b7ba9b7cc3e1b4

Contents?: true

Size: 553 Bytes

Versions: 1

Compression:

Stored size: 553 Bytes

Contents

require 'spec_helper'

describe 'Veritas::Relation::Operation::Order::Ascending.call' do
  subject { object.call(left, right) }

  let(:object) { Relation::Operation::Order::Ascending }

  context 'when left is equal to right' do
    let(:left)  { 1 }
    let(:right) { 1 }

    it { should be(0) }
  end

  context 'when left is greater than right' do
    let(:left)  { 2 }
    let(:right) { 1 }

    it { should be(1) }
  end

  context 'when left is less than right' do
    let(:left)  { 1 }
    let(:right) { 2 }

    it { should be(-1) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.2 spec/unit/veritas/relation/operation/order/ascending/class_methods/call_spec.rb