Sha256: 39a6ef3dbd933a47e99fd3fdb2ae6090a888a52ca52e286366822d7b02d06f77
Contents?: true
Size: 888 Bytes
Versions: 1
Compression:
Stored size: 888 Bytes
Contents
require 'swt_shoes/spec_helper' describe Shoes::Swt::Common::Painter do let(:object) {double 'object', dsl: dsl} let(:dsl) {double 'dsl', visible?: true, positioned?: true} let(:event) {double 'paint event', gc: graphics_context} let(:graphics_context) {double 'graphics_context'} subject {Shoes::Swt::Common::Painter.new object} describe '#paint_control' do it 'should attempts to paint the object' do expect(subject).to receive(:paint_object) subject.paint_control event end it 'does paint the object if it is hidden' do dsl.stub visible?: false expect(subject).not_to receive(:paint_object) subject.paint_control event end it 'does not paint the object if it is not positioned' do dsl.stub positioned?: false expect(subject).not_to receive(:paint_object) subject.paint_control event end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shoes-4.0.0.pre1 | spec/swt_shoes/common/painter_spec.rb |