Sha256: 0cd98a19c04f818f71bac7b23907b9b5e169207b5ad069cd6e0b3658a83dfb11

Contents?: true

Size: 975 Bytes

Versions: 1

Compression:

Stored size: 975 Bytes

Contents

require 'spec_helper'

describe Shoes::App do
  before :each do
    # The stubs that are unstubbed here occur in the spec_helper
    # error not triggered with a stubbed flush (removing the stub overall
    # seemed to difficult after initial try)
    allow_any_instance_of(Shoes::Swt::App).to receive(:flush).and_call_original
    allow(Shoes::Swt::RedrawingAspect).to receive(:new).and_call_original
  end

  it 'does not fail with just a simple para #574' do
    app = nil
    begin
      expect do
        app = Shoes.app { para 'me no fail' }
        app.quit
      end.not_to raise_error
    ensure
      # Really ugly, but we have to can't let the redrawing aspect persist out
      # of this test run, don't really want to expose it broadly, and can't
      # clear it during `quit` like might feel natural because of #782
      aspect = app.instance_variable_get(:@__app__).gui.instance_variable_get(:@redrawing_aspect)
      aspect.remove_redraws
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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