#!/bin/sh

. "$(dirname $0)/common.sh"

prepare

cd "$AUTOPKGTEST_TMP"

# Test jgem functionality

# check if default local gems exist
# (specific gem not important)
jgem list | grep '^json'

# check if we can install a new gem
jgem install --bindir ./bin trocla
jgem list | grep -q "^trocla ([0-9\.]\+)"

# invoke the new gem's binary
jruby -S trocla --version
