Sha256: ec2ae7e3cf0a9fb9c54510166f579ae3f95f28da2a89b2c46b6e1e90996bb737
Contents?: true
Size: 1.45 KB
Versions: 1
Compression:
Stored size: 1.45 KB
Contents
require 'test_helper' module Vedeu describe Canvas do let(:described) { Vedeu::Canvas } let(:instance) { described.canvas } let(:yn) { 25 } let(:xn) { 80 } before { instance.configure(yn, xn) } describe '.canvas' do it { instance.must_be_instance_of(Vedeu::Canvas) } end describe '#configure' do it { instance.must_be_instance_of(Vedeu::Canvas) } end describe '#c' do it { instance.c.must_equal([13, 40]) } it { instance.must_respond_to(:centre) } end describe '#cy' do it { instance.cy.must_equal(13) } it { instance.must_respond_to(:centre_y) } end describe '#cx' do it { instance.cx.must_equal(40) } it { instance.must_respond_to(:centre_x) } end describe '#o' do it { instance.o.must_equal(1) } it { instance.must_respond_to(:origin) } end describe '#y' do it { instance.y.must_equal(1) } it { instance.must_respond_to(:top) } end describe '#yn' do it { instance.yn.must_equal(25) } it { instance.must_respond_to(:bottom) } it { instance.must_respond_to(:height) } end describe '#x' do it { instance.x.must_equal(1) } it { instance.must_respond_to(:left) } end describe '#xn' do it { instance.xn.must_equal(80) } it { instance.must_respond_to(:right) } it { instance.must_respond_to(:width) } end end # Canvas end # Vedeu
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.4.8 | test/lib/vedeu/geometry/canvas_test.rb |