File: hooks.rb

package info (click to toggle)
ruby-aruba 2.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,972 kB
  • sloc: ruby: 7,151; javascript: 6,850; makefile: 5
file content (63 lines) | stat: -rw-r--r-- 1,203 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
require "cucumber/platform"

Before "@requires-python" do
  next unless Aruba.platform.which("python").nil?

  skip_this_scenario
end

Before "@requires-zsh" do
  next unless Aruba.platform.which("zsh").nil?

  skip_this_scenario
end

Before "@requires-java" do
  next unless Aruba.platform.which("javac").nil?

  skip_this_scenario
end

Before "@requires-perl" do
  next unless Aruba.platform.which("perl").nil?

  skip_this_scenario
end

Before "@requires-ruby" do
  next unless Aruba.platform.which("ruby").nil?

  skip_this_scenario
end

Before "@requires-posix-standard-tools" do
  next unless Aruba.platform.which("printf").nil?

  skip_this_scenario
end

Before "@requires-ruby-platform-java" do
  skip_this_scenario unless Cucumber::JRUBY
end

Before "@unsupported-on-platform-java" do
  skip_this_scenario if Cucumber::JRUBY
end

Before "@unsupported-on-platform-windows" do
  skip_this_scenario if Cucumber::WINDOWS
end

Before "@requires-readline" do
  require "readline"
rescue LoadError
  skip_this_scenario
end

Before "@unsupported-on-platform-unix" do
  skip_this_scenario unless Cucumber::WINDOWS
end

Before "@unsupported-on-platform-mac" do
  skip_this_scenario if Cucumber::OS_X
end