Sha256: 287c4c6e45d9fc5063b0fea7ca864dbef8107147ea9a645a9e35d47157d7992a

Contents?: true

Size: 750 Bytes

Versions: 1

Compression:

Stored size: 750 Bytes

Contents

require 'spec_helper'

describe Shoes::Swt::ShellControlListener do
  let(:app) { double 'SWT App', dsl: dsl_app, shell: shell, real: real }
  let(:shell) { double('Shell').as_null_object }
  let(:resize_callbacks) { [] }
  let(:dsl_app) { double('DSL App', resize_callbacks: resize_callbacks).as_null_object }
  let(:block) { double 'Block', call: nil }
  let(:resize_event) { double 'resize_event', widget: shell }
  let(:real) { double('Swt Real').as_null_object }

  subject { Shoes::Swt::ShellControlListener.new(app) }
  before :each do
    subject.controlResized(resize_event)
  end

  describe 'resize' do
    let(:resize_callbacks) { [block] }
    it 'calls the resize block' do
      expect(block).to have_received(:call)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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