spec/shoes/swt/shape_spec.rb in shoes-swt-4.0.0.pre3 vs spec/shoes/swt/shape_spec.rb in shoes-swt-4.0.0.pre4

- old
+ new

@@ -1,11 +1,12 @@ require 'shoes/swt/spec_helper' describe Shoes::Swt::Shape do include_context "swt app" - let(:dsl) { instance_double("Shoes::Shape", hidden: false, style: {}).as_null_object } + let(:dsl) { instance_double("Shoes::Shape", hidden: false, + needs_rotate?: false,style: {}).as_null_object } subject { Shoes::Swt::Shape.new dsl, swt_app } shared_examples_for "Swt::Shape" do let(:ancestors) { subject.class.ancestors.map(&:name) } @@ -18,10 +19,11 @@ end it_behaves_like "Swt::Shape" it_behaves_like "paintable" it_behaves_like "removable" + it_behaves_like 'clickable backend' it "properly disposes" do expect(subject.transform).to receive(:dispose) expect(subject.element).to receive(:dispose) subject.dispose @@ -40,9 +42,14 @@ end it "delegates #line_to" do expect(element).to receive(:line_to).with(20, 30) subject.line_to 20, 30 + end + + it "delegates #arc_to" do + expect(element).to receive(:add_arc).with(25, 45, 50, 20, 0.0, -90.0) + subject.arc_to 50, 55, 50, 20, 0, Shoes::PI/2 end end describe "moving" do let(:transform) { double("transform") }