Sha256: 61346ebc819e0b20520888da4efac747ab9d011abbd97db95b325e0263a7ac45
Contents?: true
Size: 1.4 KB
Versions: 5
Compression:
Stored size: 1.4 KB
Contents
require 'test_helper' module Vedeu describe RenderBorder do let(:described) { Vedeu::RenderBorder } let(:instance) { described.new(border) } let(:border) { Vedeu::Border.new(enabled: enabled, name: _name).store } let(:visible) { false } let(:enabled) { false } let(:_name) { 'Vedeu::RenderBorder' } it { described.must_respond_to(:with) } describe '#initialize' do it { instance.must_be_instance_of(described) } it { instance.instance_variable_get('@border').must_equal(border) } end describe '#render' do before do Vedeu::Geometry.new(name: _name, x: 1, xn: 3, y: 1, yn: 3).store Vedeu::Interface.new(name: _name, visible: visible).store end after do Vedeu.geometries.reset! Vedeu.interfaces.reset! Vedeu.borders.reset! end subject { instance.render } context 'when the interface is not visible' do it { subject.must_equal([]) } end context 'when the interface is visible' do let(:visible) { true } context 'when the border is not enabled' do it { subject.must_equal([]) } end context 'when the border is enabled' do let(:enabled) { true } # @todo Add more tests. # it { skip } end end end end # RenderBorder end # Vedeu
Version data entries
5 entries across 5 versions & 1 rubygems