diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/dbshell/exec_alias_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/dbshell/exec_alias_spec.rb b/spec/dbshell/exec_alias_spec.rb new file mode 100644 index 0000000..1b8c425 --- /dev/null +++ b/spec/dbshell/exec_alias_spec.rb @@ -0,0 +1,25 @@ +require 'minitest/autorun' +require 'dbshell/exec_alias' + +describe DBShell::ExecAlias do + describe ".build_command" do + it "prefixes the command with an interactive version of the current \ + shell" do + DBShell::ExecAlias.build_command([ + 'psql', + '-U', + 'derpyhooves', + '-h', + 'mailmarehost', + '-p', + '6027', + 'dbname' + ]).must_equal([ + ENV['SHELL'], + '-i', + '-c', + 'psql -U derpyhooves -h mailmarehost -p 6027 dbname' + ]) + end + end +end |