Sha256: e625d234da70ecdf23b50818a549a90e6ad704bfff05eb2a65b8682801ba4544

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

require 'spec_helper'

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

  let(:dsl) do
    double('dsl', app: shoes_app, pass_coordinates?: true).as_null_object
  end

  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

1 entries across 1 versions & 1 rubygems

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