Sha256: e0133fee6a0bea82a9438bd521cc2e75f5037f4177997089e18957ea858878a4
Contents?: true
Size: 706 Bytes
Versions: 9
Compression:
Stored size: 706 Bytes
Contents
When /^I post configs to "(.*?)" in the API$/ do |route| @data = { 'host' => 'i.am', 'port' => '1337' } @route = route API.post do |req| req.url "api/#{@route}" req.params = @data end end Then /^the memcached config should be set$/ do response = API.get("api/#{@route}") response_json = JSON.parse(response.body) response.status.should be 200 response_json['host'].should eql @data['host'] response_json['port'].should eql @data['port'] # Workaround so the next feature don't use the current memcached configs @data = { 'host' => MemcachedConfigs[:host], 'port' => MemcachedConfigs[:port] } API.post do |req| req.url "api/#{@route}" req.params = @data end end
Version data entries
9 entries across 9 versions & 1 rubygems