summaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-09-16 12:56:13 +0200
committerAzul <azul@riseup.net>2016-09-16 14:06:09 +0200
commitb2ddc9ffa9fdc880ca301817d59277343005fd5d (patch)
treea97f0608e4293d03a2c387c1ea250c725a550030 /test/functional
parentc9f785d3c4adb780bd61d8f5e3fd6414915cca0a (diff)
bugfix: load order issue in server, include test
Includes our first functional test. This one only makes sure loading the bin/nickserver actually works fine. Enough to catch this bug.
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/bin_test.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/functional/bin_test.rb b/test/functional/bin_test.rb
new file mode 100644
index 0000000..bc15e38
--- /dev/null
+++ b/test/functional/bin_test.rb
@@ -0,0 +1,24 @@
+require 'minitest/autorun'
+require 'minitest/pride'
+require 'minitest/hell'
+
+class BinTest < Minitest::Test
+
+ def test_bin_loading
+ assert_command_runs("version")
+ assert_equal 0, $?.exitstatus
+ end
+
+ protected
+
+ def assert_command_runs(command)
+ out = `#{path_to_executable} #{command} 2>&1`
+ assert ($?.exitstatus == 0),
+ "failed to run 'nickserver #{command}':\n #{out}"
+ end
+
+ def path_to_executable
+ File.expand_path(File.dirname(__FILE__) + '/../../bin/nickserver')
+ end
+
+end