Sha256: 0c44047f02aae8166a4204b3805cf75fc9e8cb7f3fb1cbace6769d88c29083df

Contents?: true

Size: 452 Bytes

Versions: 2

Compression:

Stored size: 452 Bytes

Contents

require 'shoes/swt/spec_helper'

describe Shoes::Swt::TextBlock::CenteredTextSegment do
  let(:width) { 200 }
  let(:dsl)   { double("dsl", text: "boo", font: "", size: 16, style:{}) }

  subject { Shoes::Swt::TextBlock::CenteredTextSegment.new(dsl, width)}

  it "takes all the width it can get" do
    expect(subject.width).to eq(width)
  end

  it "calls last line width the full width" do
    expect(subject.last_line_width).to eq(width)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shoes-swt-4.0.0.pre4 spec/shoes/swt/text_block/centered_text_segment_spec.rb
shoes-swt-4.0.0.pre3 spec/shoes/swt/text_block/centered_text_segment_spec.rb