[DRE-commits] [ruby-aruba] 31/74: Added hooks to work around problemw with specific platforms

Hideki Yamane henrich at moszumanska.debian.org
Sat Nov 28 01:16:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch debian/sid
in repository ruby-aruba.

commit f9c22ea923208e2c7e3229c5b999f7fb242f91a7
Author: Max Meyer <dev at fedux.org>
Date:   Tue Nov 24 17:09:41 2015 +0100

    Added hooks to work around problemw with specific platforms
---
 features/step_definitions/hooks.rb | 87 ++++++++++++++++++++++++++++++++++++--
 1 file changed, 83 insertions(+), 4 deletions(-)

diff --git a/features/step_definitions/hooks.rb b/features/step_definitions/hooks.rb
index ba25c0f..1faeef7 100644
--- a/features/step_definitions/hooks.rb
+++ b/features/step_definitions/hooks.rb
@@ -1,17 +1,96 @@
 require 'cucumber/platform'
 
 Before '@requires-ruby-version-193' do
-  next unless RUBY_VERSION < '1.9.3'
+  next if RUBY_VERSION >= '1.9.3'
 
   if Cucumber::VERSION < '2'
-    pending
+    skip_invoke!
+  else
+    skip_this_scenario
+  end
+end
+
+Before '@requires-ruby-version-19' do
+  next if RUBY_VERSION >= '1.9'
+
+  if Cucumber::VERSION < '2'
+    skip_invoke!
+  else
+    skip_this_scenario
+  end
+end
+
+Before '@requires-ruby-version-2' do
+  next if RUBY_VERSION >= '2'
+
+  if Cucumber::VERSION < '2'
+    skip_invoke!
   else
     skip_this_scenario
   end
 end
 
 Before '@requires-aruba-version-1' do
-  next unless Aruba::VERSION > '1'
+  next if Aruba::VERSION > '1'
+
+  if Cucumber::VERSION < '2'
+    skip_invoke!
+  else
+    skip_this_scenario
+  end
+end
+
+Before '@requires-ruby-platform-java' do
+  # leave if java
+  next if RUBY_PLATFORM.include? 'java'
+
+  if Cucumber::VERSION < '2'
+    skip_invoke!
+  else
+    skip_this_scenario
+  end
+end
 
-  skip_this_scenario if Cucumber::VERSION >= '2'
+Before '@requires-ruby-platform-mri' do
+  # leave if not java
+  next unless RUBY_PLATFORM.include? 'java'
+
+  if Cucumber::VERSION < '2'
+    skip_invoke!
+  else
+    skip_this_scenario
+  end
+end
+
+Before '@unsupported-on-platform-windows' do
+  # leave if not windows
+  next unless FFI::Platform.windows?
+
+  if Cucumber::VERSION < '2'
+    skip_invoke!
+  else
+    skip_this_scenario
+  end
+end
+
+Before '@unsupported-on-platform-unix' do
+  # leave if not windows
+  next unless FFI::Platform.unix?
+
+  if Cucumber::VERSION < '2'
+    skip_invoke!
+  else
+    skip_this_scenario
+  end
+end
+
+Before '@unsupported-on-platform-mac' do
+  # leave if not windows
+  next unless FFI::Platform.mac?
+
+  if Cucumber::VERSION < '2'
+    skip_invoke!
+  else
+    skip_this_scenario
+  end
 end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-aruba.git



More information about the Pkg-ruby-extras-commits mailing list