summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph <chris@inferno.nadir.org>2015-11-26 21:41:42 +0100
committerChristoph <chris@inferno.nadir.org>2015-11-26 22:30:35 +0100
commitd51e381ffc489cc9c984727658475da93d1869dd (patch)
tree66d15b32c5362135a5c071906defb405e871fc66
parent016ec71359f6b1b368624c6c94bac2b509791658 (diff)
make extra sure versioncmp behaves as expected
since we depend on versioncmp and that function had some bugs in the past, make sure it behaves as expected in our usecases
-rw-r--r--spec/functions/versioncmp_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/functions/versioncmp_spec.rb b/spec/functions/versioncmp_spec.rb
new file mode 100644
index 0000000..0a24427
--- /dev/null
+++ b/spec/functions/versioncmp_spec.rb
@@ -0,0 +1,9 @@
+require 'spec_helper'
+
+describe 'versioncmp' do
+ it { should run.with_params('7.2','8').and_return(-1) }
+ it { should run.with_params('7','8').and_return(-1) }
+ it { should run.with_params('8','8').and_return(0) }
+ it { should run.with_params('8.1','8').and_return(1) }
+end
+