Sha256: f290dacd56ad7056a8df06550592c200eeb94ba5a32fd7b74be136f5210d0482

Contents?: true

Size: 1.07 KB

Versions: 2

Compression:

Stored size: 1.07 KB

Contents

require 'shoes/swt/spec_helper'

describe Shoes::Swt::Flow do
  include_context "swt app"

  let(:dsl) { double('dsl', app: shoes_app,
                     pass_coordinates?: true).as_null_object }
  let(:real) { double('real', disposed?: false) }
  let(:parent_real) { double('parent_real', :get_layout => "ok") }

  subject { Shoes::Swt::Flow.new(dsl, parent) }

  # it does not use toggle anymore and hides each element individually
  # which means that each element takes care of what this spec specs,
  # which we test elsewhere.
  # Add back in when slots get an appropriate backend.
  # #905
  # it_behaves_like "updating visibility"

  it_behaves_like "clickable backend" do
    let(:click_block_parameters) { click_block_coordinates }
  end

  describe "#initialize" do
    before do
      allow(parent).to receive(:real) { parent_real }
      allow(parent_real).to receive(:get_layout){double(top_slot: true)}
    end

    it "sets readers" do
      expect(subject.parent).to eq parent
      expect(subject.dsl).to eq dsl
      expect(subject.real).to eq parent_real
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shoes-swt-4.0.0.pre4 spec/shoes/swt/flow_spec.rb
shoes-swt-4.0.0.pre3 spec/shoes/swt/flow_spec.rb