Parent

Class Index [+]

Quicksearch

Test::Unit::TestCase

This extension of the standard Test::Unit::TestCase makes RSpec available from within, so that you can do things like:

require ‘spec/test/unit‘

class MyTest < Test::Unit::TestCase

  it "should work with Test::Unit assertions" do
    assert_equal 4, 2+1
  end

  def test_should_work_with_rspec_expectations
    (3+1).should == 5
  end

end

See also Spec::Example::ExampleGroup

Public Class Methods

example_method?(method_name) click to toggle source
    # File lib/spec/interop/test/unit/testcase.rb, line 29
29:       def self.example_method?(method_name)
30:         should_method?(method_name) || test_method?(method_name)
31:       end
new(description, &implementation) click to toggle source
    # File lib/spec/interop/test/unit/testcase.rb, line 43
43:       def initialize(description, &implementation)
44:         super
45:         # Some Test::Unit extensions depend on @method_name being present.
46:         @method_name = description.description
47:         @_result = ::Test::Unit::TestResult.new
48:       end
suite() click to toggle source
    # File lib/spec/interop/test/unit/testcase.rb, line 25
25:       def self.suite
26:         Test::Unit::TestSuiteAdapter.new(self)
27:       end
test_method?(method_name) click to toggle source
    # File lib/spec/interop/test/unit/testcase.rb, line 33
33:       def self.test_method?(method_name)
34:         method_name =~ /^test./ && (
35:           instance_method(method_name).arity == 0 ||
36:           instance_method(method_name).arity == 1
37:         )
38:       end

Public Instance Methods

run(ignore_this_argument=nil) click to toggle source
    # File lib/spec/interop/test/unit/testcase.rb, line 50
50:       def run(ignore_this_argument=nil)
51:         super()
52:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.