[DRE-commits] [ruby-aruba] 64/98: Check if default shells used in tests are installed on developer pc

Hideki Yamane henrich at moszumanska.debian.org
Tue Mar 22 12:20:41 UTC 2016


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 3b293ef7a7825c0d14c7ccc8a57e8c376721cf94
Author: Dennis Günnewig <dg1 at ratiodata.de>
Date:   Mon Jan 4 18:01:11 2016 +0100

    Check if default shells used in tests are installed on developer pc
---
 features/steps/command/shell.feature | 86 ++++++++++++++++++++++++++----------
 script/bootstrap                     |  8 ++++
 2 files changed, 70 insertions(+), 24 deletions(-)

diff --git a/features/steps/command/shell.feature b/features/steps/command/shell.feature
index d9c8589..b6bdb07 100644
--- a/features/steps/command/shell.feature
+++ b/features/steps/command/shell.feature
@@ -1,15 +1,17 @@
 Feature: Running shell commands
 
-  You can run an *ad hoc* script with the following step
+  You can run an *ad hoc* script with the following steps:
   - `When I run the following script:`
 
   Or you can run shell commands with:
-  - `I run the following (bash|zsh|fish|dash)? commands`
+  - `I run the following (bash|zsh|...shell)? commands`
+  - `I run the following (bash|zsh|...shell)? commands (in|with) \`interpreter\``
+  - `I run the following (bash|zsh|...shell)? commands (in|with) \`/path/to/interpreter\``
 
   Background:
     Given I use a fixture named "cli-app"
 
-  Scenario: Running ruby script
+  Scenario: Creating and running scripts
     Given a file named "features/shell.feature" with:
     """
     Feature: Running scripts
@@ -21,14 +23,7 @@ Feature: Running shell commands
         puts "Hello"
         \"\"\"
         Then the output should contain exactly "Hello"
-    """
-    When I run `cucumber`
-    Then the features should all pass
 
-  Scenario: Running python script
-    Given a file named "features/shell.feature" with:
-    """
-    Feature: Running scripts
       Scenario: Running python script
         When I run the following script:
         \"\"\"bash
@@ -75,43 +70,86 @@ Feature: Running shell commands
     """
     Feature: Running zsh scripts
       Scenario: Running zsh commands
-        When I run the following commands in `zsh`:
+        When I run the following commands with `zsh`:
         \"\"\"bash
         echo "Hello \c"
         echo $((2 + 2))
         \"\"\"
         Then the output should contain exactly "Hello 4"
+    """
+    When I run `cucumber`
+    Then the features should all pass
 
-      Scenario: Running zsh commands
+  Scenario: Running ruby commands
+    Given a file named "features/shell.feature" with:
+    """
+    Feature: Running scripts
+      Scenario: Running ruby commands
+        When I run the following commands with `ruby`:
+        \"\"\"ruby
+        puts "Hello, Aruba!"
+        \"\"\"
+        Then the output should contain exactly "Hello, Aruba!"
+    """
+    When I run `cucumber`
+    Then the features should all pass
+
+  Scenario: Running python commands
+    Given a file named "features/shell.feature" with:
+    """
+    Feature: Running scripts
+      Scenario: Running ruby commands
+        When I run the following commands with `python`:
+        \"\"\"ruby
+        print("Hello, Aruba!")
+        \"\"\"
+        Then the output should contain exactly "Hello, Aruba!"
+    """
+    When I run `cucumber`
+    Then the features should all pass
+
+  Scenario: Running commands if full path to interpreter is given
+    Given a file named "features/shell.feature" with:
+    """
+    Feature: Running full path zsh
+      Scenario: Running zsh commands #1
         When I run the following commands with `/bin/zsh`:
         \"\"\"bash
         echo "Hello \c"
         echo $((6 - 2))
         \"\"\"
         Then the output should contain exactly "Hello 4"
+
+      Scenario: Running zsh commands #1
+        When I run the following commands in `/bin/zsh`:
+        \"\"\"bash
+        echo "Hello \c"
+        echo $((6 - 2))
+        \"\"\"
+        Then the output should contain exactly "Hello 4"
     """
     When I run `cucumber`
     Then the features should all pass
 
-  Scenario: Running fish commands
+  Scenario: Running commands if only the name of interpreter is given
     Given a file named "features/shell.feature" with:
     """
-    Feature: Running fish scripts
-      Scenario: Running fish commands
-        When I run the following commands in `fish`:
+    Feature: Running full path zsh
+      Scenario: Running zsh commands #1
+        When I run the following commands with `zsh`:
         \"\"\"bash
-        echo -n "Hello "
-        echo (echo fish)
+        echo "Hello \c"
+        echo $((6 - 2))
         \"\"\"
-        Then the output should contain exactly "Hello fish"
+        Then the output should contain exactly "Hello 4"
 
-      Scenario: Running fish commands with explicit path
-        When I run the following commands with `/usr/bin/env fish`:
+      Scenario: Running zsh commands #2
+        When I run the following commands in `zsh`:
         \"\"\"bash
-        echo -n "Hello "
-        echo (echo fish)
+        echo "Hello \c"
+        echo $((6 - 2))
         \"\"\"
-        Then the output should contain exactly "Hello fish"
+        Then the output should contain exactly "Hello 4"
     """
     When I run `cucumber`
     Then the features should all pass
diff --git a/script/bootstrap b/script/bootstrap
index fc797ab..34d106f 100755
--- a/script/bootstrap
+++ b/script/bootstrap
@@ -13,6 +13,14 @@ echo -ne "$info_msg Checking if ruby installed? "
 which 'ruby' >/dev/null 2>error.log || ( echo -e "$error_msg\n\nCould not find \`ruby\`. Please install ruby or add it to PATH"; output_error_log; exit 1 )
 echo OK
 
+echo -ne "$info_msg Checking if bash installed? "
+which 'bash' >/dev/null 2>error.log || ( echo -e "$error_msg\n\nCould not find \`bash\`. Please install bash or add it to PATH"; output_error_log; exit 1 )
+echo OK
+
+echo -ne "$info_msg Checking if zsh installed? "
+which 'zsh' >/dev/null 2>error.log || ( echo -e "$error_msg\n\nCould not find \`zsh\`. Please install zsh or add it to PATH"; output_error_log; exit 1 )
+echo OK
+
 echo -e "$info_msg rubygem \"bundler\" "
 gem install bundler
 

-- 
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