Sha256: 81598b7f78cb0231cc7ac1e36702353c85f75d45c2f3343cf516e0cd00630bb1

Contents?: true

Size: 631 Bytes

Versions: 35

Compression:

Stored size: 631 Bytes

Contents

require_relative 'test_helper.rb'

require_relative '../lib/frank-cucumber/rect'

module Frank module Cucumber

describe Rect do
  it 'parsing from the api hash representation correctly' do
    api_repr = { "origin" => {"x" => 1.1, "y" => 2.2}, "size" => { "height" => 11.1, "width" => 22.2 } }
    rect = Rect.from_api_repr( api_repr )

    rect.x.must_equal 1.1
    rect.y.must_equal 2.2
    rect.width.must_equal 22.2
    rect.height.must_equal 11.1
  end

  it 'calculates the center correctly' do
    rect = Rect.new( 100, 200, 11, 21 )
    rect.center.x.must_equal 105.5
    rect.center.y.must_equal 210.5
  end
end

end end

Version data entries

35 entries across 35 versions & 4 rubygems

Version Path
sc-frank-ios-1.2.3 test/rect_test.rb
frank-cucumber-1.2.5 test/rect_test.rb
frank-cucumber-1.2.4.pre1 test/rect_test.rb
sc-frank-cucumber-1.2.1.bba52d7.debug test/rect_test.rb
sc-frank-cucumber-1.2.1.e1e3ccb.debug test/rect_test.rb
sc-frank-cucumber-1.2.1.1a856ca.debug test/rect_test.rb
frank-pivotal-1.2.3.pre.1 test/rect_test.rb
frank-pivotal-1.2.3 test/rect_test.rb
sc-frank-cucumber-1.2.1.b7791c5.debug test/rect_test.rb
frank-cucumber-1.2.3 test/rect_test.rb
sc-frank-cucumber-1.2.1.3256dc1.debug test/rect_test.rb
sc-frank-cucumber-1.2.1.9c95c03.debug test/rect_test.rb
sc-frank-cucumber-1.2.1.1dcc760.debug test/rect_test.rb
frank-cucumber-1.2.2 test/rect_test.rb
sc-frank-cucumber-1.2.1.1dcc760 test/rect_test.rb
frank-cucumber-1.2.1 test/rect_test.rb
sc-frank-cucumber-1.2.1.902fa34 test/rect_test.rb
sc-frank-cucumber-1.2.1.d2d00d2 test/rect_test.rb
sc-frank-cucumber-1.2.1.c13cb90 test/rect_test.rb
sc-frank-cucumber-1.2.1.00af28c test/rect_test.rb