spec/shoes/swt/text_block/fitter_spec.rb in shoes-swt-4.0.0.pre4 vs spec/shoes/swt/text_block/fitter_spec.rb in shoes-swt-4.0.0.pre5
- old
+ new
@@ -1,20 +1,20 @@
-require 'shoes/swt/spec_helper'
+require 'spec_helper'
describe Shoes::Swt::TextBlock::Fitter do
let(:dsl) { double('dsl', parent: parent_dsl, text: "Text goes here",
- desired_width: 85, centered?: false,
- absolute_left: 25, absolute_top: 75,
- element_left: 26, element_top: 76,
- margin_left: 1, margin_top: 1) }
+ desired_width: 85, centered?: false,
+ absolute_left: 25, absolute_top: 75,
+ element_left: 26, element_top: 76,
+ margin_left: 1, margin_top: 1) }
let(:parent_dsl) { double('parent_dsl', parent: grandparent_dsl,
- absolute_top: 0, absolute_left: 0, absolute_right: 100,
- width: parent_width, height: 200) }
+ absolute_top: 0, absolute_left: 0, absolute_right: 100,
+ width: parent_width, height: 200) }
let(:grandparent_dsl) { double('grandparent_dsl', parent: app,
- width: grandparent_width) }
+ width: grandparent_width) }
let(:app) { double('app', width: app_width) }
let(:parent_width) { 100 }
let(:grandparent_width) { 1000 }
@@ -99,10 +99,9 @@
before(:each) do
layout = double('swt_layout', :spacing => 4, :spacing= => nil)
allow(segment).to receive(:position_at) { segment }
allow(segment).to receive(:spacing) { 4 }
allow(segment).to receive(:layout) { layout }
-
end
context "to one segment" do
it "should work" do
segments = when_fit_at(x: 25, y: 75, next_line_start: 130)