#!/usr/bin/env bats load test_helper @test "installs ruby-build into PREFIX" { mkdir -p "$TMP" cd "$TMP" PREFIX="${PWD}/usr" run "${BATS_TEST_DIRNAME}/../install.sh" assert_success "" cd usr assert [ -x bin/ruby-build ] assert [ -x bin/rbenv-install ] assert [ -x bin/rbenv-uninstall ] assert [ -e share/ruby-build/1.8.6-p383 ] assert [ -e share/ruby-build/ree-1.8.7-2012.02 ] assert [ -e share/man/man1/ruby-build.1 ] assert [ ! -e share/man/man1/ruby-build.1.adoc ] } @test "build definitions don't have the executable bit" { mkdir -p "$TMP" cd "$TMP" PREFIX="${PWD}/usr" run "${BATS_TEST_DIRNAME}/../install.sh" assert_success "" run $BASH -c 'ls -l usr/share/ruby-build | tail -2 | cut -c1-10' assert_output <