Sha256: cb29a9277e1b5d570c69adea4f73443ea4fd656969745b83e9bb7c6bb9aaf35e

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

require 'shoes/spec_helper'

describe Shoes::Check do
  include_context "dsl app"

  subject { Shoes::Check.new(app, parent, input_opts, input_block) }

  it_behaves_like "checkable"
  it_behaves_like "object with state"
  it_behaves_like "object with style" do
    let(:subject_without_style) { Shoes::Check.new(app, parent) }
    let(:subject_with_style) { Shoes::Check.new(app, parent, arg_styles) }
  end

  describe "dimensions" do
    let(:left) { 10 }
    let(:top) { 20 }
    let(:width) { 100 }
    let(:height) { 200 }
    let(:input_opts){ {left: left, top: top, width: width, height: height} }
    subject { Shoes::Check.new(app, parent, input_opts) }

    it_behaves_like "object with dimensions"

    describe "takes relative dimensions from parent" do
      subject { Shoes::Check.new(app, parent, relative_opts) }
      it_behaves_like "object with relative dimensions"
    end

    describe "negative dimensions" do
      subject { Shoes::Check.new(app, parent, negative_opts) }
      it_behaves_like "object with negative dimensions"
    end
  end
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
shoes-core-4.0.0.pre4 spec/shoes/check_spec.rb
shoes-core-4.0.0.pre3 spec/shoes/check_spec.rb
shoes-swt-4.0.0.pre2 spec/shoes/check_spec.rb
shoes-dsl-4.0.0.pre2 spec/shoes/check_spec.rb