# File lib/active_support/testing/declarative.rb, line 9
9: def self.describe(text)
10: class_eval def self.name "#{text}" end, __FILE__, __LINE__ + 1
11: end
# File lib/active_support/testing/declarative.rb, line 5
5: def self.extended(klass)
6: klass.class_eval do
7:
8: unless method_defined?(:describe)
9: def self.describe(text)
10: class_eval def self.name "#{text}" end, __FILE__, __LINE__ + 1
11: end
12: end
13:
14: end
15: end
test “verify something” do
...
end
# File lib/active_support/testing/declarative.rb, line 25
25: def test(name, &block)
26: test_name = "test_#{name.gsub(/\s+/,'_')}".to_sym
27: defined = instance_method(test_name) rescue false
28: raise "#{test_name} is already defined in #{self}" if defined
29: if block_given?
30: define_method(test_name, &block)
31: else
32: define_method(test_name) do
33: flunk "No implementation provided for #{name}"
34: end
35: end
36: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.