Sha256: 02925d357fd4dcd806524a76294e06896b73fa95adae186b0b9de927ac7bd73a

Contents?: true

Size: 676 Bytes

Versions: 1

Compression:

Stored size: 676 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

require 'spec_helper'
require_relative '../lib/geometry-befr'


describe Geometry::Triangle do

  subject { Geometry::Triangle.new(3, 4, 5) }

  its(:perimeter) { should eq 12}
  its(:area) { should eq 6}
  its(:angles) { should eq [36.87, 53.13, 90.0]}
  its(:valid?) { should eq true}

end


describe Geometry::Rectangle do

  subject { Geometry::Rectangle.new(4, 6) }

  its(:area) { should eq 24}
  its(:perimeter) { should eq 20}

end


describe Geometry::Circle do
  
  subject { Geometry::Circle.new(3) }

  its(:circumference) { should eq 6 * Math::PI}
  its(:area) { should eq 9 * Math::PI}

end




Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
geometry-befr-0.0.0 spec/geometry-befr_spec.rb