Sha256: d5adb580f92df77e3067cd8ce9045b8b285262c61a2a0a7590b4e148b25aa20e
Contents?: true
Size: 979 Bytes
Versions: 2
Compression:
Stored size: 979 Bytes
Contents
Given /httpimagestore server is running at (.*) with the following configuration/ do |url, config| cfile = Tempfile.new('httpimagestore.conf') cfile.write(config) cfile.close begin start_server( "bundle exec #{script('httpimagestore')} #{cfile.path}", '/tmp/httpimagestore.pid', support_dir + 'server.log', url ) ensure cfile.unlink end end Given /httpthumbnailer server is running at (.*)/ do |url| start_server( "httpthumbnailer", '/tmp/httpthumbnailer.pid', support_dir + 'thumbniler.log', url ) end Given /(.*) file content as request body/ do |file| @request_body = File.open(support_dir + file){|f| f.read } end When /I do (.*) request (.*)/ do |method, uri| @response = HTTPClient.new.request(method, uri, nil, @request_body) end Then /I will get matching response body/ do |body| @response.body.should =~ Regexp.new(/^#{body}$/m) end Then /I will get the following response body/ do |body| @response.body.should == body end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
httpimagestore-0.0.2 | features/step_definitions/httpimagestore_steps.rb |
httpimagestore-0.0.1 | features/step_definitions/httpimagestore_steps.rb |