Sha256: 188099168b7153b33d14cf7453f2635268c8a9908c46f90df95225710b992910

Contents?: true

Size: 875 Bytes

Versions: 4

Compression:

Stored size: 875 Bytes

Contents

require 'test_helper'

module Vedeu

  describe PositionValidator do

    let(:described) { Vedeu::PositionValidator }
    let(:instance)  { described.new(_name, x, y) }
    let(:_name)     {}
    let(:x)         {}
    let(:y)         {}

    describe '#initialize' do
      it { instance.must_be_instance_of(described) }
      it { instance.instance_variable_get('@name').must_equal(_name) }
      it { instance.instance_variable_get('@x').must_equal(x) }
      it { instance.instance_variable_get('@y').must_equal(y) }
    end

    describe '.validate' do
      subject { described.validate(_name, x, y) }

      it { instance.must_be_instance_of(described) }
    end

    describe '#y' do
      subject { described.validate(_name, x, y).y }
    end

    describe '#x' do
      subject { described.validate(_name, x, y).x }
    end

  end # PositionValidator

end # Vedeu

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vedeu-0.4.17 test/lib/vedeu/geometry/position_validator_test.rb
vedeu-0.4.16 test/lib/vedeu/geometry/position_validator_test.rb
vedeu-0.4.15 test/lib/vedeu/geometry/position_validator_test.rb
vedeu-0.4.14 test/lib/vedeu/geometry/position_validator_test.rb