spec/shoes/swt/shoes_layout_spec.rb in shoes-swt-4.0.0.pre6 vs spec/shoes/swt/shoes_layout_spec.rb in shoes-swt-4.0.0.pre7

- old
+ new

@@ -5,24 +5,29 @@ result = Shoes::Swt::ShoesLayout.new result.gui_app = gui_app result end - let(:gui_app) { double('gui_app', dsl: dsl, real: real, shell: shell) } - let(:real) { double('real', set_size: nil, - location: location, :location= => nil) } - let(:size) { double('size', height: 0, width: 0) } - let(:location) { double('location', :y= => nil) } - let(:dsl) { double('dsl', top_slot: top_slot, - height: 100, width: 100) } - let(:top_slot) { double('top_slot', contents_alignment: 0, - :width= => nil, :height= => nil) } - let(:shell) { double('shell', vertical_bar: vertical_bar) } - let(:vertical_bar) { double('vertical_bar', :increment= => nil, - :visible= => nil, :maximum= => nil, - :thumb= => nil, thumb: 0) } + let(:gui_app) { double('gui_app', dsl: dsl, real: real, shell: shell) } + let(:size) { double('size', height: 0, width: 0) } + let(:location) { double('location', :y= => nil) } + let(:dsl) { double('dsl', top_slot: top_slot, height: 100, width: 100) } + let(:shell) { double('shell', vertical_bar: vertical_bar) } let(:scroll_height) { dsl.height * 2 } + + let(:real) do + double('real', set_size: nil, location: location, :location= => nil) + end + + let(:top_slot) do + double('top_slot', contents_alignment: 0, :width= => nil, :height= => nil) + end + + let(:vertical_bar) do + double('vertical_bar', :increment= => nil, :visible= => nil, + :maximum= => nil, :thumb= => nil, thumb: 0) + end before do allow(real).to receive(:compute_trim) do |_, _, width, height| double('size', width: width, height: height) end