Sha256: 6678395265f69ee0bc5e07095b444d2011780212c486f7fc3a87388e38927562

Contents?: true

Size: 741 Bytes

Versions: 1

Compression:

Stored size: 741 Bytes

Contents

require 'shoes/swt/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.pre4 spec/shoes/swt/shell_control_listener_spec.rb