Sha256: c3c0a3441d09a66076c7c097841506a58fc3573863f3fe27c442f57db6d5cd2d

Contents?: true

Size: 882 Bytes

Versions: 1

Compression:

Stored size: 882 Bytes

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"

  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

1 entries across 1 versions & 1 rubygems

Version Path
shoes-4.0.0.pre1 spec/shoes/check_spec.rb