Sha256: 2f5a7f813cf222da3a93ef2d77fc431dc26d0be7b77d636a049260072e8383e3

Contents?: true

Size: 1.26 KB

Versions: 24

Compression:

Stored size: 1.26 KB

Contents

require 'test_helper'

module Vedeu

  describe Cell do

    let(:described)  { Vedeu::Cell }
    let(:instance)   { described.new(attributes) }
    let(:attributes) {
      {
        colour: colour,
        style:  style,
        value:  _value,
        x:      x,
        y:      y,
      }
    }
    let(:colour) { Colour.new(background: '#000000') }
    let(:style)  {}
    let(:_value) {}
    let(:x)      {}
    let(:y)      {}

    describe '#initialize' do
      subject { instance }

      it { subject.must_be_instance_of(described) }
      it { subject.instance_variable_get('@colour').must_equal(colour) }
      it { subject.instance_variable_get('@style').must_equal(style) }
      it { subject.instance_variable_get('@value').must_equal(_value) }
      it { subject.instance_variable_get('@x').must_equal(x) }
      it { subject.instance_variable_get('@y').must_equal(y) }
    end

    describe '#eql?' do
      let(:other) { described.new(colour: Colour.new(background: '#000000')) }

      subject { instance.eql?(other) }

      it { subject.must_equal(true) }

      context 'when different to other' do
        let(:other) { described.new(colour: Colour.new(background: '#ff0000')) }

        it { subject.must_equal(false) }
      end
    end

  end # Cell

end # Vedeu

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
vedeu-0.4.40 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.39 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.38 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.37 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.36 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.35 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.34 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.33 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.32 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.31 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.30 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.29 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.28 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.27 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.26 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.25 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.24 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.23 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.22 test/lib/vedeu/models/cell_test.rb
vedeu-0.4.21 test/lib/vedeu/models/cell_test.rb