File tree 2 files changed +39
-0
lines changed
2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -21,4 +21,10 @@ def test_that_is_pending
21
21
def test_that_raises
22
22
raise "oops"
23
23
end
24
+
25
+ def test_with_output
26
+ $stdout. puts "hello from $stdout.puts\n another line"
27
+ puts "hello from puts\n another line"
28
+ $stdout. write "hello from write\n another line"
29
+ end
24
30
end
Original file line number Diff line number Diff line change @@ -80,7 +80,40 @@ def test_test_runner_output
80
80
"uri" => uri ,
81
81
} ,
82
82
} ,
83
+ {
84
+ "method" => "start" ,
85
+ "params" => {
86
+ "id" => "SampleTest#test_with_output" ,
87
+ "uri" => uri ,
88
+ } ,
89
+ } ,
90
+ {
91
+ "method" => "append_output" ,
92
+ "params" => {
93
+ "message" => "hello from $stdout.puts\r \n another line\r \n " ,
94
+ } ,
95
+ } ,
96
+ {
97
+ "method" => "append_output" ,
98
+ "params" => {
99
+ "message" => "hello from puts\r \n another line\r \n " ,
100
+ } ,
101
+ } ,
102
+ {
103
+ "method" => "append_output" ,
104
+ "params" => {
105
+ "message" => "hello from write\r \n another line" ,
106
+ } ,
107
+ } ,
108
+ {
109
+ "method" => "pass" ,
110
+ "params" => {
111
+ "id" => "SampleTest#test_with_output" ,
112
+ "uri" => uri ,
113
+ } ,
114
+ } ,
83
115
]
116
+ assert_equal ( 2 + 2 + 2 + 2 + 5 , actual . size )
84
117
assert_equal ( expected , actual )
85
118
end
86
119
end
You can’t perform that action at this time.
0 commit comments