Sha256: 12eaf4cdfe43d1dcb6bf7147579ceba8e335e522bcc8db87ef4a0a761ff6bf3e

Contents?: true

Size: 446 Bytes

Versions: 1

Compression:

Stored size: 446 Bytes

Contents

shared_examples_for "shape DSL method" do
  let(:shape) {
    dsl.shape {
      move_to 400, 300
      line_to 400, 200
      line_to 100, 100
      line_to 400, 300
      quad_to 100, 100, 20, 200
    }
  }

  it "creates a Shoes::Shape" do
    shape.should be_an_instance_of(Shoes::Shape)
  end

  it "receives style from app" do
    green = Shoes::COLORS.fetch :green
    dsl.style[:stroke] = green
    shape.stroke.should eq(green)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoes-4.0.0.pre1 spec/shoes/shared_examples/dsl/shape.rb