File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 88 class Curly ::Request ; end
99 class MockResponse ; end
1010 MockResponse . singleton_class . class_eval { define_method ( 'status' ) { |*params | 200 } }
11+ MockResponse . singleton_class . class_eval { define_method ( 'success?' ) { |*params | 1 } }
1112 MockResponse . singleton_class . class_eval { define_method ( 'body' ) { |*params | 'foobar' } }
1213 Curly ::Request . singleton_class . class_eval { define_method ( 'post' ) { |*params | open_params . push ( params ) ; MockResponse } }
1314
@@ -38,7 +39,7 @@ class MockResponse;end
3839 )
3940
4041 expect ( client ) . to be_an_instance_of ( WebServiceSwigClient )
41- expect ( client . render ( 'foo.html' , { foo :'bar' } ) ) . to eq true
42+ expect ( client . render ( 'foo.html' , { foo :'bar' } ) ) . to eq "foobar"
4243 expect ( open_params [ 0 ] ) . to eq [ "http://localhost/123/foo.html" , { :headers => { "Content-type" => "application/json" } , :body => "{\" foo\" :\" bar\" }" } ]
4344
4445 end
You can’t perform that action at this time.
0 commit comments