Sha256: 6940fd56cdf6756c398152f319092892599990e89e287763b050509b9eff2f5a
Contents?: true
Size: 333 Bytes
Versions: 4
Compression:
Stored size: 333 Bytes
Contents
require 'test/unit/given' class Circle def initialize(radius) @radius = radius end def area; (3.14 * @radius * @radius).to_i; end end class TestCircle < Test::Unit::Given::TestCase test_that { Given { @circle = Circle.new(10) } When { @area = @circle.area } Then { assert_equal 314,@area } } end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
test_unit-given-0.9.4 | test/test_circle.rb |
test_unit-given-0.9.3 | test/test_circle.rb |
test_unit-given-0.9.2 | test/test_circle.rb |
test_unit-given-0.9.1 | test/test_circle.rb |