Sha256: 0b5036a2eafc3805c176b3ab8ee64447224720a01c09c8ff7e893cf9d7763f7a

Contents?: true

Size: 744 Bytes

Versions: 1

Compression:

Stored size: 744 Bytes

Contents

require 'shoes/swt/spec_helper'

describe Shoes::Swt::Slot do
  include_context "swt app"
  let(:dsl) {instance_double Shoes::Slot, hidden?: true,
                             visible?: false, contents: [content] }
  let(:content) {double 'content', show: true, hide: true}

  subject {Shoes::Swt::Slot.new dsl, swt_app}

  describe '#update_visibility' do
    it 'does not set visibility on the parent #904' do
      subject.update_visibility
      expect(swt_app.real).not_to have_received(:set_visible)
    end

    # spec may be deleted if we can hide slots as a whole and not each element
    # on its own
    it 'tries to hide the content' do
      subject.update_visibility
      expect(content).to have_received :hide
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoes-swt-4.0.0.pre4 spec/shoes/swt/slot_spec.rb