Sha256: 63d33e7eb90db37bea277999e611351138e4f76f138f5081fec59fc7bb8e3bc1

Contents?: true

Size: 618 Bytes

Versions: 1

Compression:

Stored size: 618 Bytes

Contents

require 'spec_helper'

describe 'Veritas::Relation::Operation::Order::Direction.coerce' do
  subject { object.coerce(argument) }

  let(:attribute) { Attribute::Integer.new(:id)                      }
  let(:object)    { Class.new(Relation::Operation::Order::Direction) }

  context 'when the argument is a Direction' do
    let(:argument) { Relation::Operation::Order::Ascending.new(attribute) }

    it { should equal(argument) }
  end

  context 'when the argument is an Attribute' do
    let(:argument) { attribute }

    it { should be_kind_of(object) }

    its(:attribute) { should equal(attribute) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.2 spec/unit/veritas/relation/operation/order/direction/class_methods/coerce_spec.rb