Skip to content

Commit 0323540

Browse files
committed
Fixed unit tests to pass
1 parent 415f41a commit 0323540

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/client_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
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

0 commit comments

Comments
 (0)