<commit_before>require 'shoes/spec_helper'

describe Shoes::Shape do
  let(:app) { Shoes::App.new }
  subject { Shoes::Shape.new(app) {} }

  it_behaves_like "object with stroke"
  it_behaves_like "object with style"
  it_behaves_like "movable object"

  describe "octagon" do
    let(:draw) {
      Proc.new {
        xs = [200, 300, 370, 370, 300, 200, 130, 130]
        ys = [100, 100, 170, 270, 340, 340, 270, 170]
        move_to xs.first, ys.first
        xs.zip(ys).each do |x, y|
          line_to(x, y)
        end
        line_to xs.first, ys.first
      }
    }
    subject { Shoes::Shape.new app, Hash.new, draw }

    its(:left) { should eq(130) }
    its(:top) { should eq(100) }
    its(:right) { should eq(370) }
    its(:bottom) { should eq(340) }
    its(:width) { should eq(240) }
    its(:height) { should eq(240) }

    it_behaves_like "movable object"
  end

  describe "curve" do
    let(:draw) {
      Proc.new {
        move_to 10, 10
        curve_to 20, 30, 100, 200, 50, 50
      }
    }
    subject { Shoes::Shape.new app, Hash.new, draw }

    its(:left)   { should eq(10) }
    its(:top)    { should eq(10) }
    its(:right)  { should eq(100) }
    its(:bottom) { should eq(200) }
    its(:width)  { should eq(90) }
    its(:height) { should eq(190) }

    it_behaves_like "movable object"
  end
end<commit_msg>Set width/height specs to pending because of new behavior akin to shoes3<commit_after>require 'shoes/spec_helper'

describe Shoes::Shape do
  let(:app) { Shoes::App.new }
  subject { Shoes::Shape.new(app) {} }

  it_behaves_like "object with stroke"
  it_behaves_like "object with style"
  it_behaves_like "movable object"

  describe "octagon" do
    let(:draw) {
      Proc.new {
        xs = [200, 300, 370, 370, 300, 200, 130, 130]
        ys = [100, 100, 170, 270, 340, 340, 270, 170]
        move_to xs.first, ys.first
        xs.zip(ys).each do |x, y|
          line_to(x, y)
        end
        line_to xs.first, ys.first
      }
    }
    subject { Shoes::Shape.new app, Hash.new, draw }

    its(:left) { should eq(130) }
    its(:top) { should eq(100) }
    its(:right) { should eq(370) }
    its(:bottom) { should eq(340) }
    its(:width) { pending; should eq(240) }
    its(:height) { pending; should eq(240) }

    it_behaves_like "movable object"
  end

  describe "curve" do
    let(:draw) {
      Proc.new {
        move_to 10, 10
        curve_to 20, 30, 100, 200, 50, 50
      }
    }
    subject { Shoes::Shape.new app, Hash.new, draw }

    its(:left)   { should eq(10) }
    its(:top)    { should eq(10) }
    its(:right)  { should eq(100) }
    its(:bottom) { should eq(200) }
    its(:width)  { pending; should eq(90) }
    its(:height) { pending; should eq(190) }

    it_behaves_like "movable object"
  end
end
{'fraction_non_alphanumeric': 0.14357682619647355, 'fraction_numerical': 0.0716084922634041, 'mean_word_length': 2.453416149068323, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '482331', 'n_tokens_mistral': 1229, 'n_tokens_neox': 1014, 'n_words': 266}