Sha256: 9daa9071b50685b0ad99086a66795089a24fc5bebeaaa2743d89d67cddc0b352

Contents?: true

Size: 648 Bytes

Versions: 1

Compression:

Stored size: 648 Bytes

Contents

require 'spec_helper'

describe Shoes::Swt::ShapePainter do
  include_context "swt app"
  include_context "painter context"

  let(:dsl) do
    double("Shoes::Shape", hidden: false, needs_rotate?: false, style: {}).as_null_object
  end

  let(:shape) { Shoes::Swt::Shape.new(dsl, swt_app) }
  subject { Shoes::Swt::ShapePainter.new(shape) }

  it_behaves_like "stroke painter"
  it_behaves_like "fill painter"
  it_behaves_like "movable painter"

  it "fills path" do
    expect(gc).to receive(:fill_path)
    subject.paint_control(event)
  end

  it "draws path" do
    expect(gc).to receive(:draw_path)
    subject.paint_control(event)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoes-swt-4.0.0.pre7 spec/shoes/swt/shape_painter_spec.rb