spec/shoes/swt/image_spec.rb in shoes-swt-4.0.0.pre4 vs spec/shoes/swt/image_spec.rb in shoes-swt-4.0.0.pre5

- old
+ new

@@ -1,6 +1,6 @@ -require 'shoes/swt/spec_helper' +require 'spec_helper' describe Shoes::Swt::Image do include_context "swt app" IMAGE_WIDTH = 3 @@ -16,11 +16,11 @@ let(:image_path) { File.dirname(__FILE__) + '/minimal.png' } let(:image) { image_path } subject { allow(dsl).to receive(:file_path) { image } - Shoes::Swt::Image.new(dsl, parent) + Shoes::Swt::Image.new(dsl, swt_app) } it_behaves_like "paintable" it_behaves_like "removable" it_behaves_like "clickable backend" @@ -40,20 +40,19 @@ subject.painter.call(event) end end describe "painting raw images" do - let(:image) { File.read(image_path, :mode => "rb") } + let(:image) { File.read(image_path, mode: "rb") } specify "loads image from raw data" do subject.real.image_data.width = 3 subject.real.image_data.height = 1 end end # note the image used is 3x1 pixel big describe 'dimensions' do - it 'has the given width' do expect(subject.width).to eq(IMAGE_WIDTH) end it 'has the given height' do