Sha256: 4fbb4f3a80787cee868608c1ee8ee78721a7656fa1986c9907d2564fc4ce0e43

Contents?: true

Size: 929 Bytes

Versions: 3

Compression:

Stored size: 929 Bytes

Contents

#!/usr/bin/env roundup
export IMGURRFILE=test/files/imgurr.json
imgurr="./bin/imgurr"
image="test/files/habs.gif"
id_file="test/id"

describe "upload"

it_uploads_image() {
  ${imgurr} upload ${image} | grep "Copied http://i.imgur.com" >> test/temp
  cat test/temp | sed 's/.*imgur.com\/\(.*\)\..*/\1/' >> ${id_file}
  chmod 777 ${id_file}
  rm test/temp
}

it_uploads_image_with_markdown() {
  ${imgurr} upload ${image} --markdown | grep "Copied !\[Screenshot\](http://i.imgur.com"
}

it_uploads_image_with_html() {
  ${imgurr} upload ${image} --html | grep "Copied <img src=\"http://i.imgur.com/.*\" alt=\"Screenshot\">"
}

it_uploads_image_with_html_and_size() {
  ${imgurr} upload ${image} --html --size 45 | grep "Copied <img src=\"http://i.imgur.com/.*\" alt=\"Screenshot\" width=\"45%\">"
}

it_uploads_image_with_title_desc() {
  ${imgurr} upload ${image} --title "Test" --desc "Test" | grep "Copied http://i.imgur.com"
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
imgurr-0.2.0 test/1-upload.sh
imgurr-0.1.2 test/1-upload.sh
imgurr-0.1.1 test/1-upload.sh