-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMANUAL
53 lines (47 loc) · 1.39 KB
/
MANUAL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<%
##
# Creates an example listing from the code in the given block.
#
def example_test_run &block
Ember::Template.wrap_content_block(block) do |content|
code = "require 'detest/auto'\n\n#{content.join}"
[
'===================================================================',
'When the following test is run:', nil,
'[source,ruby]',
'-------------------------------------------------------------------',
code,
'-------------------------------------------------------------------',
nil,
'Detest will output the following:', nil,
'-------------------------------------------------------------------',
IO.popen('ruby -Ilib 2>&1', 'w+') do |ruby|
ruby.write code
ruby.close_write
ruby.read
end,
'-------------------------------------------------------------------',
nil,
'===================================================================',
].join("\n")
end
end
##
# Returns a link to the given core method on the Dfect module.
#
def method_api_docs name, text = 'API documentation'
require 'cgi'
"#{@api_docs_url}/Detest.html##{CGI.escape name}-class_method[#{text}]"
end
%>
%+ 'SYNOPSIS'
%+ 'README'
%+ 'INSTALL'
%+ 'USAGE'
%+ 'ASSERTIONS'
%+ 'TESTS'
%+ 'EMULATION'
%+ 'HACKING'
%+ 'HISTORY'
%+ 'CREDITS'
%+ 'BEYOND'