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