Sha256: 2d6abc8cfabf038d99bd465ca71f3be88238e204ef9e07c0953d3f4e9cef590c
Contents?: true
Size: 568 Bytes
Versions: 150
Compression:
Stored size: 568 Bytes
Contents
module ActiveSupport module Testing module Declarative # test "verify something" do # ... # end def test(name, &block) test_name = "test_#{name.gsub(/\s+/,'_')}".to_sym defined = instance_method(test_name) rescue false raise "#{test_name} is already defined in #{self}" if defined if block_given? define_method(test_name, &block) else define_method(test_name) do flunk "No implementation provided for #{name}" end end end end end end
Version data entries
150 entries across 119 versions & 14 rubygems