Sha256: 196fd5736004c797463f271dae166d1097d4db69c607b2322987498823534918
Contents?: true
Size: 1.05 KB
Versions: 4
Compression:
Stored size: 1.05 KB
Contents
require 'shoes/spec_helper' shared_examples_for "basic rect" do it "retains app" do expect(rect.app).to eq(app) end it "creates gui object" do expect(rect.gui).not_to be_nil end end describe Shoes::Rect do include_context "dsl app" let(:parent) { app } let(:left) { 44 } let(:top) { 66 } let(:width) { 111 } let(:height) { 333 } subject(:rect) { Shoes::Rect.new(app, parent, left, top, width, height) } describe '#style' do it 'restyles handed in fill colors (even the weird ones)' do subject.style fill: 'fff' expect(subject.style[:fill]).to eq Shoes::Color.new 255, 255, 255 end end it_behaves_like "basic rect" it_behaves_like "object with style" do let(:subject_without_style) { Shoes::Rect.new(app, parent, left, top, width, height) } let(:subject_with_style) { Shoes::Rect.new(app, parent, left, top, width, height, arg_styles) } end it_behaves_like "object with dimensions" it_behaves_like "movable object" it_behaves_like "left, top as center" it_behaves_like 'object with parent' end
Version data entries
4 entries across 4 versions & 3 rubygems
Version | Path |
---|---|
shoes-core-4.0.0.pre4 | spec/shoes/rect_spec.rb |
shoes-core-4.0.0.pre3 | spec/shoes/rect_spec.rb |
shoes-swt-4.0.0.pre2 | spec/shoes/rect_spec.rb |
shoes-dsl-4.0.0.pre2 | spec/shoes/rect_spec.rb |