Class: Test::Unit::Given::TestCase

Inherits:
TestCase
  • Object
show all
Includes:
Any, Simple, TestThat
Defined in:
lib/test/unit/given/test_case.rb

Overview

Public: A Base class brings in both the Simple Given/Then/When stuff as well as the test_that method you can use to define tests a bit more fluently.

Example

class TestCircle < Test::Unit::Given::TestCase
  test_that {
    Given { @circle = Circle.new(10) }
    When  { @area = @circle.area }
    Then  { assert_equal 314,@area }
  }
end

Constant Summary

Constants included from Any

Any::MAX_RAND

Instance Method Summary collapse

Methods included from Any

#any, #any_int, #any_number, #any_string, #new_any

Methods included from TestThat

included

Methods included from Simple

#And, #But, #Given, #Then, #When, #mocks_shouldve_been_called, #the_test_runs

Instance Method Details

#default_testObject

Avoid the stupid behavior of complaining that no tests were specified for 1.8.-like rubies



29
30
# File 'lib/test/unit/given/test_case.rb', line 29

def default_test
end