spec/helpers/stubs.rb in transmission-rpc-ruby-0.3.1 vs spec/helpers/stubs.rb in transmission-rpc-ruby-0.4.0
- old
+ new
@@ -18,10 +18,16 @@
stub_rpc_request
.with(body: session_get_body({fields: fields}))
.to_return(successful_response)
end
+ def stub_set_location_torrent(body)
+ stub_rpc_request
+ .with(body: torrent_set_location_body(body))
+ .to_return(successful_response)
+ end
+
def torrent_get_body(arguments = {})
args = {fields: Transmission::Fields::TorrentGet.new.to_fields}.merge(arguments)
{method: 'torrent-get', arguments: args}.to_json
end
@@ -33,9 +39,13 @@
{method: 'torrent-remove', arguments: arguments}.to_json
end
def torrent_set_body(arguments = {})
{method: 'torrent-set', arguments: arguments}.to_json
+ end
+
+ def torrent_set_location_body(arguments = {})
+ {method: 'torrent-set-location', arguments: arguments}.to_json
end
def torrent_method_body(method, arguments)
{method: method, arguments: arguments}.to_json
end
\ No newline at end of file