Mock Version: 1.2.13 ENTER do(['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/rubygem-aruba.spec'], chrootPath='/var/lib/mock/epel-1-armhfp-4ebb69dac89e89741f07b46ab51bd78d0030d8e7/root'shell=FalseprintOutput=Falseenv={'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'PROMPT_COMMAND': 'printf "\x1b]0;\x07"', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOME': '/builddir', 'HOSTNAME': 'mock'}gid=135user='mockbuild'timeout=0logger=uid=996) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/rubygem-aruba.spec'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'PROMPT_COMMAND': 'printf "\x1b]0;\x07"', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOME': '/builddir', 'HOSTNAME': 'mock'} and shell False Building target platforms: noarch Building for target noarch Wrote: /builddir/build/SRPMS/rubygem-aruba-0.5.4-2.el7.src.rpm Child return code was: 0 LEAVE do --> ENTER do(['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target noarch --nodeps /builddir/build/SPECS/rubygem-aruba.spec '], chrootPath='/var/lib/mock/epel-1-armhfp-4ebb69dac89e89741f07b46ab51bd78d0030d8e7/root'shell=Falseuid=996env={'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'PROMPT_COMMAND': 'printf "\x1b]0;\x07"', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOME': '/builddir', 'HOSTNAME': 'mock'}gid=135user='mockbuild'timeout=0private_network=Truelogger=printOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target noarch --nodeps /builddir/build/SPECS/rubygem-aruba.spec '] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'PROMPT_COMMAND': 'printf "\x1b]0;\x07"', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOME': '/builddir', 'HOSTNAME': 'mock'} and shell False Building target platforms: noarch Building for target noarch Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.Eq43Rb + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf rubygem-aruba-0.5.4 + /usr/bin/mkdir -p rubygem-aruba-0.5.4 + cd rubygem-aruba-0.5.4 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + mkdir -p ./usr/share/gems + CONFIGURE_ARGS='--with-cflags='\''-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard'\'' ' + gem install -V --local --install-dir ./usr/share/gems --bindir ./usr/bin --force --document=ri,rdoc /builddir/build/SOURCES/aruba-0.5.4.gem Installing gem aruba-0.5.4 /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/.document /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/.gitignore /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/.rspec /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/.rvmrc /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/.travis.yml /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/Gemfile /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/History.md /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/LICENSE /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/README.md /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/Rakefile /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/aruba.gemspec /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/config/.gitignore /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/cucumber.yml /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/features/before_cmd_hooks.feature /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/features/command_environment_variables.feature /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/features/custom_ruby_process.feature /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/features/exit_statuses.feature /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/features/file_system_commands.feature /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/features/flushing.feature /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/features/interactive.feature /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/features/no_clobber.feature /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/features/output.feature /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/features/step_definitions/aruba_dev_steps.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/features/support/custom_main.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/features/support/env.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/features/support/jruby.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/features/utf-8.feature /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/lib/aruba.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/lib/aruba/api.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/lib/aruba/config.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/lib/aruba/cucumber.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/lib/aruba/cucumber/hooks.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/lib/aruba/errors.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/lib/aruba/in_process.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/lib/aruba/jruby.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/lib/aruba/matchers/rspec_matcher_include_regexp.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/lib/aruba/reporting.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/lib/aruba/spawn_process.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/spec/aruba/api_spec.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/spec/aruba/hooks_spec.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/spec/aruba/jruby_spec.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/spec/aruba/spawn_process_spec.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/spec/spec_helper.rb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/templates/css/console.css /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/templates/css/filesystem.css /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/templates/css/pygments-autumn.css /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/templates/files.erb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/templates/images/LICENSE /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/templates/images/folder.png /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/templates/images/page_white.png /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/templates/images/page_white_gherkin.png /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/templates/images/page_white_ruby.png /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/templates/index.erb /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/templates/js/filesystem.js /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/templates/js/jquery-1.6.1.min.js /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/templates/main.erb Successfully installed aruba-0.5.4 Parsing documentation for aruba-0.5.4 Installing ri documentation for aruba-0.5.4 Installing darkfish documentation for aruba-0.5.4 1 gem installed Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.EYsKtP Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.ernb6q + exit 0 + umask 022 + cd /builddir/build/BUILD + cd rubygem-aruba-0.5.4 + exit 0 + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/rubygem-aruba-0.5.4-2.el7.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/rubygem-aruba-0.5.4-2.el7.noarch ++ dirname /builddir/build/BUILDROOT/rubygem-aruba-0.5.4-2.el7.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/rubygem-aruba-0.5.4-2.el7.noarch + cd rubygem-aruba-0.5.4 + mkdir -p /builddir/build/BUILDROOT/rubygem-aruba-0.5.4-2.el7.noarch/usr/share/gems + cp -a ./usr/share/gems/build_info ./usr/share/gems/cache ./usr/share/gems/doc ./usr/share/gems/gems ./usr/share/gems/specifications /builddir/build/BUILDROOT/rubygem-aruba-0.5.4-2.el7.noarch/usr/share/gems/ + /usr/lib/rpm/find-debuginfo.sh --strict-build-id -m --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 /builddir/build/BUILD/rubygem-aruba-0.5.4 /usr/lib/rpm/sepdebugcrcfix: Updated 0 CRC32s, 0 CRC32s did match. + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-compress + /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 + /usr/lib/rpm/redhat/brp-python-hardlink + /usr/lib/rpm/redhat/brp-java-repack-jars Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.4tOTAs + umask 022 + cd /builddir/build/BUILD + cd rubygem-aruba-0.5.4 + pushd ./usr/share/gems/gems/aruba-0.5.4 ~/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4 ~/build/BUILD/rubygem-aruba-0.5.4 + cucumber Using the default profile... Feature: before_cmd hooks You can configure Aruba to run blocks of code before it runs each command. The command will be passed to the block. Scenario: Run a simple command with a before hook # features/before_cmd_hooks.feature:8 Given a file named "test.rb" with: # lib/aruba/cucumber.rb:24 """ $: << '../../lib' require 'aruba/api' Aruba.configure do |config| config.before_cmd do |cmd| puts "about to run `#{cmd}`" end end include Aruba::Api run_simple("echo 'running'") puts all_stdout """ When I run `ruby test.rb` # lib/aruba/cucumber.rb:84 Then it should pass with: # lib/aruba/cucumber.rb:196 """ about to run `echo 'running'` running """ # This should move into a spec Scenario: Use something from the context where the command was run # features/before_cmd_hooks.feature:32 Given a file named "test.rb" with: # lib/aruba/cucumber.rb:24 """ $: << '../../lib' require 'aruba/api' Aruba.configure do |config| config.before_cmd do |cmd| puts "I can see @your_context=#{@your_context}" end end class Test include Aruba::Api def test @your_context = "something" run_simple("echo 'running'") puts all_stdout end end Test.new.test """ When I run `ruby test.rb` # lib/aruba/cucumber.rb:84 Then it should pass with: # lib/aruba/cucumber.rb:196 """ I can see @your_context=something running """ Feature: Command environment variables In order to test command line applications which make use of environment variables As a developer using Cucumber I want to use the command environment variable step Scenario: Changing the environment # features/command_environment_variables.feature:7 Given I set the environment variables to: # lib/aruba/cucumber.rb:70 | variable | value | | LONG_LONG_VARIABLE | long_value | When I run `/usr/bin/env` # lib/aruba/cucumber.rb:84 Then the output should contain: # lib/aruba/cucumber.rb:147 """ long_value """ Feature: Custom Ruby Process Running a lot of scenarios where each scenario uses Aruba to spawn a new ruby process can be time consuming. Aruba lets you plug in your own process class that can run a command in the same ruby process as Cucumber/Aruba. @in-process Scenario: Run a passing custom process # features/custom_ruby_process.feature:10 When I run `reverse olleh dlrow` # lib/aruba/cucumber.rb:84 Then the output should contain "hello world" # lib/aruba/cucumber.rb:131 Feature: exit statuses In order to specify expected exit statuses As a developer using Cucumber I want to use the "the exit status should be" step Scenario: exit status of 0 # features/exit_statuses.feature:7 When I run `true` # lib/aruba/cucumber.rb:84 Then the exit status should be 0 # lib/aruba/cucumber.rb:188 Scenario: non-zero exit status # features/exit_statuses.feature:11 When I run `false` # lib/aruba/cucumber.rb:84 Then the exit status should be 1 # lib/aruba/cucumber.rb:188 And the exit status should not be 0 # lib/aruba/cucumber.rb:192 Scenario: Successfully run something # features/exit_statuses.feature:16 When I successfully run `true` # lib/aruba/cucumber.rb:95 Scenario: Successfully run something for a long time # features/exit_statuses.feature:19 Given The default aruba timeout is 0 seconds # lib/aruba/cucumber.rb:7 When I successfully run `sleep 1` for up to 2 seconds # lib/aruba/cucumber.rb:95 Scenario: Unsuccessfully run something that takes too long # features/exit_statuses.feature:23 Given The default aruba timeout is 0 seconds # lib/aruba/cucumber.rb:7 When I do aruba I successfully run `sleep 1` # features/step_definitions/aruba_dev_steps.rb:1 Then aruba should fail with "process still alive after 0 seconds" # features/step_definitions/aruba_dev_steps.rb:18 Scenario: Unsuccessfully run something # features/exit_statuses.feature:28 When I do aruba I successfully run `false` # features/step_definitions/aruba_dev_steps.rb:1 Then aruba should fail with "" # features/step_definitions/aruba_dev_steps.rb:18 Feature: file system commands In order to specify commands that load files As a developer using Cucumber I want to create temporary files Scenario: create a dir # features/file_system_commands.feature:7 Given a directory named "foo/bar" # lib/aruba/cucumber.rb:15 When I run `file foo/bar` # lib/aruba/cucumber.rb:84 Then the stdout should contain "foo/bar: directory" # lib/aruba/cucumber.rb:237 Scenario: create a file # features/file_system_commands.feature:12 Given a file named "foo/bar/example.txt" with: # lib/aruba/cucumber.rb:24 """ hello world """ When I run `cat foo/bar/example.txt` # lib/aruba/cucumber.rb:84 Then the output should contain exactly "hello world" # lib/aruba/cucumber.rb:157 Scenario: create a fixed sized file # features/file_system_commands.feature:20 Given a 1048576 byte file named "test.txt" # lib/aruba/cucumber.rb:33 Then a 1048576 byte file named "test.txt" should exist # lib/aruba/cucumber.rb:314 Scenario: Append to a file # features/file_system_commands.feature:24 \### We like appending to files: 1. Disk space is cheap 1. It's completely safe \### Here is a list: - One - Two Given a file named "foo/bar/example.txt" with: # lib/aruba/cucumber.rb:24 """ hello world """ When I append to "foo/bar/example.txt" with: # lib/aruba/cucumber.rb:54 """ this was appended """ When I run `cat foo/bar/example.txt` # lib/aruba/cucumber.rb:84 Then the stdout should contain "hello world" # lib/aruba/cucumber.rb:237 And the stdout should contain "this was appended" # lib/aruba/cucumber.rb:237 Scenario: Append to a new file # features/file_system_commands.feature:47 When I append to "thedir/thefile" with "x" # lib/aruba/cucumber.rb:58 And I append to "thedir/thefile" with "y" # lib/aruba/cucumber.rb:58 Then the file "thedir/thefile" should contain "xy" # lib/aruba/cucumber.rb:334 Scenario: clean up files generated in previous scenario # features/file_system_commands.feature:52 Then the file "foo/bar/example.txt" should not exist # lib/aruba/cucumber.rb:286 Scenario: change to a subdir # features/file_system_commands.feature:55 Given a file named "foo/bar/example.txt" with: # lib/aruba/cucumber.rb:24 """ hello world """ When I cd to "foo/bar" # lib/aruba/cucumber.rb:66 And I run `cat example.txt` # lib/aruba/cucumber.rb:84 Then the output should contain "hello world" # lib/aruba/cucumber.rb:131 Scenario: Reset current directory from previous scenario # features/file_system_commands.feature:65 When I run `pwd` # lib/aruba/cucumber.rb:84 Then the output should match /\057tmp\057aruba$/ # lib/aruba/cucumber.rb:171 Scenario: Holler if cd to bad dir # features/file_system_commands.feature:69 When I do aruba I cd to "foo/nonexistant" # features/step_definitions/aruba_dev_steps.rb:1 Then aruba should fail with "tmp/aruba/foo/nonexistant is not a directory" # features/step_definitions/aruba_dev_steps.rb:18 Scenario: Check for presence of a subset of files # features/file_system_commands.feature:73 Given an empty file named "lorem/ipsum/dolor" # lib/aruba/cucumber.rb:37 Given an empty file named "lorem/ipsum/sit" # lib/aruba/cucumber.rb:37 Given an empty file named "lorem/ipsum/amet" # lib/aruba/cucumber.rb:37 Then the following files should exist: # lib/aruba/cucumber.rb:290 | lorem/ipsum/dolor | | lorem/ipsum/amet | Scenario: Check for absence of files # features/file_system_commands.feature:81 Then the following files should not exist: # lib/aruba/cucumber.rb:294 | lorem/ipsum/dolor | Scenario: Check for presence of a single file # features/file_system_commands.feature:85 Given an empty file named "lorem/ipsum/dolor" # lib/aruba/cucumber.rb:37 Then a file named "lorem/ipsum/dolor" should exist # lib/aruba/cucumber.rb:298 Scenario: Check for absence of a single file # features/file_system_commands.feature:89 Then a file named "lorem/ipsum/dolor" should not exist # lib/aruba/cucumber.rb:302 Scenario: Check for absence of a single file using a regex # features/file_system_commands.feature:92 Then a file matching %r<^ipsum> should not exist # lib/aruba/cucumber.rb:310 Scenario: Check for presence of a single file using a regex # features/file_system_commands.feature:95 Given an empty file named "lorem/ipsum/dolor" # lib/aruba/cucumber.rb:37 Then a file matching %r should exist # lib/aruba/cucumber.rb:306 Scenario: Check for presence of a single file using a more complicated regex # features/file_system_commands.feature:99 Given an empty file named "lorem/ipsum/dolor" # lib/aruba/cucumber.rb:37 Then a file matching %r should exist # lib/aruba/cucumber.rb:306 Scenario: Check for presence of a subset of directories # features/file_system_commands.feature:103 Given a directory named "foo/bar" # lib/aruba/cucumber.rb:15 Given a directory named "foo/bla" # lib/aruba/cucumber.rb:15 Then the following directories should exist: # lib/aruba/cucumber.rb:318 | foo/bar | | foo/bla | Scenario: check for absence of directories # features/file_system_commands.feature:110 Given a directory named "foo/bar" # lib/aruba/cucumber.rb:15 Given a directory named "foo/bla" # lib/aruba/cucumber.rb:15 Then the following step should fail with Spec::Expectations::ExpectationNotMetError: # features/step_definitions/aruba_dev_steps.rb:22 """ Then the following directories should not exist: | foo/bar/ | | foo/bla/ | """ Scenario: Check for presence of a single directory # features/file_system_commands.feature:120 Given a directory named "foo/bar" # lib/aruba/cucumber.rb:15 Then a directory named "foo/bar" should exist # lib/aruba/cucumber.rb:326 Scenario: Check for absence of a single directory # features/file_system_commands.feature:124 Given a directory named "foo/bar" # lib/aruba/cucumber.rb:15 Then the following step should fail with Spec::Expectations::ExpectationNotMetError: # features/step_definitions/aruba_dev_steps.rb:22 """ Then a directory named "foo/bar" should not exist """ Scenario: Check file contents # features/file_system_commands.feature:131 Given a file named "foo" with: # lib/aruba/cucumber.rb:24 """ hello world """ Then the file "foo" should contain "hello world" # lib/aruba/cucumber.rb:334 And the file "foo" should not contain "HELLO WORLD" # lib/aruba/cucumber.rb:338 Scenario: Check file contents with regexp # features/file_system_commands.feature:139 Given a file named "foo" with: # lib/aruba/cucumber.rb:24 """ hello world """ Then the file "foo" should match /hel.o world/ # lib/aruba/cucumber.rb:350 And the file "foo" should not match /HELLO WORLD/ # lib/aruba/cucumber.rb:354 Scenario: Check file contents with docstring # features/file_system_commands.feature:147 Given a file named "foo" with: # lib/aruba/cucumber.rb:24 """ foo bar baz foobar """ Then the file "foo" should contain: # lib/aruba/cucumber.rb:342 """ bar baz """ Scenario: Remove file # features/file_system_commands.feature:161 Given a file named "foo" with: # lib/aruba/cucumber.rb:24 """ hello world """ When I remove the file "foo" # lib/aruba/cucumber.rb:62 Then the file "foo" should not exist # lib/aruba/cucumber.rb:286 Scenario: Just a dummy for reporting # features/file_system_commands.feature:169 Given an empty file named "a/b.txt" # lib/aruba/cucumber.rb:37 Given an empty file named "a/b/c.txt" # lib/aruba/cucumber.rb:37 Given an empty file named "a/b/c/d.txt" # lib/aruba/cucumber.rb:37 Scenario: Change mode of empty file # features/file_system_commands.feature:174 Given an empty file named "test.txt" with mode "0666" # lib/aruba/cucumber.rb:41 Then the mode of filesystem object "test.txt" should match "0666" # lib/aruba/cucumber.rb:358 Scenario: Change mode of a directory # features/file_system_commands.feature:178 Given a directory named "test.d" with mode "0666" # lib/aruba/cucumber.rb:19 Then the mode of filesystem object "test.d" should match "0666" # lib/aruba/cucumber.rb:358 Scenario: Change mode of file # features/file_system_commands.feature:182 Given a file named "test.txt" with mode "0666" and with: # lib/aruba/cucumber.rb:28 """ asdf """ Then the mode of filesystem object "test.txt" should match "0666" # lib/aruba/cucumber.rb:358 Feature: Flushing output In order to test processes that output a lot of data As a developer using Aruba I want to make sure that large amounts of output aren't buffered Scenario: A little output # features/flushing.feature:7 When I run `bash -c 'for ((c=0; c<256; c = c+1)); do echo -n "a"; done'` # lib/aruba/cucumber.rb:84 Then the output should contain "a" # lib/aruba/cucumber.rb:131 And the output should be 256 bytes long # features/step_definitions/aruba_dev_steps.rb:26 And the exit status should be 0 # lib/aruba/cucumber.rb:188 Scenario: Tons of output # features/flushing.feature:13 Given The default aruba timeout is 10 seconds # lib/aruba/cucumber.rb:7 When I run `bash -c 'for ((c=0; c<65536; c = c+1)); do echo -n "a"; done'` # lib/aruba/cucumber.rb:84 Then the output should contain "a" # lib/aruba/cucumber.rb:131 And the output should be 65536 bytes long # features/step_definitions/aruba_dev_steps.rb:26 And the exit status should be 0 # lib/aruba/cucumber.rb:188 Scenario: Tons of interactive output # features/flushing.feature:20 Given The default aruba timeout is 10 seconds # lib/aruba/cucumber.rb:7 When I run `bash -c 'read size; for ((c=0; c<$size; c = c+1)); do echo -n "a"; done'` interactively # lib/aruba/cucumber.rb:104 And I type "65536" # lib/aruba/cucumber.rb:108 Then the output should contain "a" # lib/aruba/cucumber.rb:131 And the output should be 65536 bytes long # features/step_definitions/aruba_dev_steps.rb:26 Feature: Interactive process control In order to test interactive command line applications As a developer using Cucumber I want to use the interactive session steps @wip-jruby-java-1.6 Scenario: Running ruby interactively # features/interactive.feature:8 Given a file named "echo.rb" with: # lib/aruba/cucumber.rb:24 """ while res = gets.chomp break if res == "quit" puts res.reverse end """ When I run `ruby echo.rb` interactively # lib/aruba/cucumber.rb:104 And I type "hello, world" # lib/aruba/cucumber.rb:108 And I type "quit" # lib/aruba/cucumber.rb:108 Then it should pass with: # lib/aruba/cucumber.rb:196 """ dlrow ,olleh """ @posix Scenario: Running a native binary interactively # features/interactive.feature:25 When I run `cat` interactively # lib/aruba/cucumber.rb:104 And I type "Hello, world" # lib/aruba/cucumber.rb:108 And I type "" # lib/aruba/cucumber.rb:108 Then the output should contain: # lib/aruba/cucumber.rb:147 """ Hello, world """ @posix Scenario: Pipe in a file # features/interactive.feature:35 Given a file named "test.txt" with: # lib/aruba/cucumber.rb:24 """ line1 line2 """ When I run `cat` interactively # lib/aruba/cucumber.rb:104 And I pipe in the file "test.txt" # lib/aruba/cucumber.rb:116 Then the output should contain: # lib/aruba/cucumber.rb:147 """ line1 line2 """ @posix Scenario: Close stdin stream # features/interactive.feature:50 When I run `cat` interactively # lib/aruba/cucumber.rb:104 And I type "Hello, world" # lib/aruba/cucumber.rb:108 And I close the stdin stream # lib/aruba/cucumber.rb:112 Then the output should contain: # lib/aruba/cucumber.rb:147 """ Hello, world """ @posix Scenario: Stop processes before checking for filesystem changes # features/interactive.feature:60 See: http://github.com/aslakhellesoy/aruba/issues#issue/17 for context Given a directory named "rename_me" # lib/aruba/cucumber.rb:15 When I run `mv rename_me renamed` interactively # lib/aruba/cucumber.rb:104 Then a directory named "renamed" should exist # lib/aruba/cucumber.rb:326 And a directory named "rename_me" should not exist # lib/aruba/cucumber.rb:330 Feature: No clobber By default Aruba removes its scratch directory before every scenario. This isn't always the right thing to do, especially when the path to the default directory has been changed. Use @no-clobber to stop Aruba from cleaning up after itself. Scenario: Change the filesystem # features/no_clobber.feature:9 Given a directory named "foo/bar" # lib/aruba/cucumber.rb:15 And a file named "foo/bar/baz.txt" with: # lib/aruba/cucumber.rb:24 """ I don't want to die! """ @no-clobber Scenario: Verify nothing was clobbered # features/no_clobber.feature:17 Then a file named "foo/bar/baz.txt" should exist # lib/aruba/cucumber.rb:298 And the file "foo/bar/baz.txt" should contain exactly: # lib/aruba/cucumber.rb:346 """ I don't want to die! """ Scenario: Cleanup and verify the previous scenario # features/no_clobber.feature:24 Then a file named "foo/bar/baz.txt" should not exist # lib/aruba/cucumber.rb:302 Feature: Output In order to specify expected output As a developer using Cucumber I want to use the "the output should contain" step @posix Scenario: Detect subset of one-line output # features/output.feature:8 When I run `printf 'hello world'` # lib/aruba/cucumber.rb:84 Then the output should contain "hello world" # lib/aruba/cucumber.rb:131 Scenario: Detect absence of one-line output # features/output.feature:12 When I run `printf "hello world"` # lib/aruba/cucumber.rb:84 Then the output should not contain "good-bye" # lib/aruba/cucumber.rb:143 Scenario: Detect subset of multiline output # features/output.feature:16 When I run `printf "hello\nworld"` # lib/aruba/cucumber.rb:84 Then the output should contain: # lib/aruba/cucumber.rb:147 """ hello """ Scenario: Detect absence of multiline output # features/output.feature:23 When I run `printf "hello\nworld"` # lib/aruba/cucumber.rb:84 Then the output should not contain: # lib/aruba/cucumber.rb:151 """ good-bye """ @posix Scenario: Detect exact one-line output # features/output.feature:31 When I run `printf "hello world"` # lib/aruba/cucumber.rb:84 Then the output should contain exactly: # lib/aruba/cucumber.rb:163 """ hello world """ @ansi @posix Scenario: Detect exact one-line output with ANSI output # features/output.feature:40 When I run `printf "\e[36mhello world\e[0m"` # lib/aruba/cucumber.rb:84 Then the output should contain exactly: # lib/aruba/cucumber.rb:163 """ \e[36mhello world\e[0m """ @posix Scenario: Detect exact one-line output with ANSI output stripped by default # features/output.feature:48 When I run `printf "\e[36mhello world\e[0m"` # lib/aruba/cucumber.rb:84 Then the output should contain exactly: # lib/aruba/cucumber.rb:163 """ hello world """ @posix Scenario: Detect exact multiline output # features/output.feature:56 When I run `printf "hello\nworld"` # lib/aruba/cucumber.rb:84 Then the output should contain exactly: # lib/aruba/cucumber.rb:163 """ hello world """ @announce Scenario: Detect subset of one-line output with regex # features/output.feature:65 When I run `printf "hello, ruby"` # lib/aruba/cucumber.rb:84 $ cd /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/tmp/aruba $ printf "hello, ruby" hello, ruby Then the output should contain "ruby" # lib/aruba/cucumber.rb:131 And the output should match /^hello(, world)?/ # lib/aruba/cucumber.rb:171 @announce @posix Scenario: Detect subset of multiline output with regex # features/output.feature:72 When I run `printf "hello\nworld\nextra line1\nextra line2\nimportant line"` # lib/aruba/cucumber.rb:84 $ cd /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/tmp/aruba $ printf "hello world extra line1 extra line2 important line" hello world extra line1 extra line2 important line Then the output should match: # lib/aruba/cucumber.rb:175 """ he..o wor.d .* important line """ @announce Scenario: Negative matching of one-line output with regex # features/output.feature:83 When I run `printf "hello, ruby"` # lib/aruba/cucumber.rb:84 $ cd /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/tmp/aruba $ printf "hello, ruby" hello, ruby Then the output should contain "ruby" # lib/aruba/cucumber.rb:131 And the output should not match /ruby is a better perl$/ # lib/aruba/cucumber.rb:180 @announce @posix Scenario: Negative matching of multiline output with regex # features/output.feature:90 When I run `printf "hello\nworld\nextra line1\nextra line2\nimportant line"` # lib/aruba/cucumber.rb:84 $ cd /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/tmp/aruba $ printf "hello world extra line1 extra line2 important line" hello world extra line1 extra line2 important line Then the output should not match: # lib/aruba/cucumber.rb:184 """ ruby is a .* perl """ @announce @posix Scenario: Match passing exit status and partial output # features/output.feature:103 When I run `printf "hello\nworld"` # lib/aruba/cucumber.rb:84 $ cd /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/tmp/aruba $ printf "hello world" hello world Then it should pass with: # lib/aruba/cucumber.rb:196 """ hello """ @posix Scenario: Match passing exit status and exact output # features/output.feature:111 When I run `printf "hello\nworld"` # lib/aruba/cucumber.rb:84 Then it should pass with exactly: # lib/aruba/cucumber.rb:200 """ hello world """ @announce-stdout Scenario: Match failing exit status and partial output # features/output.feature:120 When I run `bash -c '(printf "hello\nworld";exit 99)'` # lib/aruba/cucumber.rb:84 hello world Then it should fail with: # lib/aruba/cucumber.rb:196 """ hello """ @posix Scenario: Match failing exit status and exact output # features/output.feature:128 When I run `bash -c '(printf "hello\nworld";exit 99)'` # lib/aruba/cucumber.rb:84 Then it should fail with exactly: # lib/aruba/cucumber.rb:200 """ hello world """ @announce-stdout @posix Scenario: Match failing exit status and output with regex # features/output.feature:138 When I run `bash -c '(printf "hello\nworld";exit 99)'` # lib/aruba/cucumber.rb:84 hello world Then it should fail with regex: # lib/aruba/cucumber.rb:204 """ hello\s*world """ @announce-cmd @posix Scenario: Match output in stdout # features/output.feature:147 When I run `printf "hello\nworld"` # lib/aruba/cucumber.rb:84 $ printf "hello world" Then the stdout should contain "hello" # lib/aruba/cucumber.rb:237 Then the stderr should not contain "hello" # lib/aruba/cucumber.rb:257 @announce Scenario: Match output on several lines # features/output.feature:153 When I run `printf 'GET /'` # lib/aruba/cucumber.rb:84 $ cd /builddir/build/BUILD/rubygem-aruba-0.5.4/usr/share/gems/gems/aruba-0.5.4/tmp/aruba $ printf 'GET /' GET / Then the stdout should contain: # lib/aruba/cucumber.rb:249 """ GET / """ @posix Scenario: Match output on several lines using quotes # features/output.feature:161 When I run `printf 'GET "/"'` # lib/aruba/cucumber.rb:84 Then the stdout should contain: # lib/aruba/cucumber.rb:249 """ GET "/" """ @posix Scenario: Detect output from all processes # features/output.feature:169 When I run `printf "hello world!\n"` # lib/aruba/cucumber.rb:84 And I run `cat` interactively # lib/aruba/cucumber.rb:104 And I type "hola" # lib/aruba/cucumber.rb:108 And I type "" # lib/aruba/cucumber.rb:108 Then the output should contain exactly: # lib/aruba/cucumber.rb:163 """ hello world! hola """ @posix Scenario: Detect stdout from all processes # features/output.feature:182 When I run `printf "hello world!\n"` # lib/aruba/cucumber.rb:84 And I run `cat` interactively # lib/aruba/cucumber.rb:104 And I type "hola" # lib/aruba/cucumber.rb:108 And I type "" # lib/aruba/cucumber.rb:108 Then the stdout should contain: # lib/aruba/cucumber.rb:249 """ hello world! hola """ And the stderr should not contain anything # lib/aruba/cucumber.rb:265 @posix Scenario: Detect stderr from all processes # features/output.feature:196 When I run `bash -c 'printf "hello world!\n" >&2'` # lib/aruba/cucumber.rb:84 And I run `bash -c 'cat >&2 '` interactively # lib/aruba/cucumber.rb:104 And I type "hola" # lib/aruba/cucumber.rb:108 And I type "" # lib/aruba/cucumber.rb:108 Then the stderr should contain: # lib/aruba/cucumber.rb:225 """ hello world! hola """ And the stdout should not contain anything # lib/aruba/cucumber.rb:265 Scenario: Detect output from named source # features/output.feature:208 When I run `printf 'simple'` # lib/aruba/cucumber.rb:84 And I run `cat` interactively # lib/aruba/cucumber.rb:104 And I type "interactive" # lib/aruba/cucumber.rb:108 And I type "" # lib/aruba/cucumber.rb:108 Then the output from "printf 'simple'" should contain "simple" # lib/aruba/cucumber.rb:135 And the output from "printf 'simple'" should contain exactly "simple" # lib/aruba/cucumber.rb:157 And the output from "printf 'simple'" should contain exactly: # lib/aruba/cucumber.rb:163 """ simple """ And the output from "cat" should not contain "simple" # lib/aruba/cucumber.rb:139 Scenario: Detect stdout from named source # features/output.feature:221 When I run `printf 'hello'` # lib/aruba/cucumber.rb:84 And I run `printf 'goodbye'` # lib/aruba/cucumber.rb:84 Then the stdout from "printf 'hello'" should contain "hello" # lib/aruba/cucumber.rb:237 And the stdout from "printf 'hello'" should contain exactly "hello" # lib/aruba/cucumber.rb:237 And the stdout from "printf 'hello'" should contain exactly: # lib/aruba/cucumber.rb:249 """ hello """ And the stderr from "printf 'hello'" should not contain "hello" # lib/aruba/cucumber.rb:282 And the stdout from "printf 'goodbye'" should not contain "hello" # lib/aruba/cucumber.rb:278 Scenario: Detect stderr from named source # features/output.feature:233 When I run `bash -c 'printf hello >&2'` # lib/aruba/cucumber.rb:84 And I run `printf goodbye` # lib/aruba/cucumber.rb:84 Then the stderr from "bash -c 'printf hello >&2'" should contain "hello" # lib/aruba/cucumber.rb:213 And the stderr from "bash -c 'printf hello >&2'" should contain exactly "hello" # lib/aruba/cucumber.rb:213 And the stderr from "bash -c 'printf hello >&2'" should contain exactly: # lib/aruba/cucumber.rb:225 """ hello """ And the stdout from "bash -c 'printf hello >&2'" should not contain "hello" # lib/aruba/cucumber.rb:278 And the stderr from "printf goodbye" should not contain "hello" # lib/aruba/cucumber.rb:282 Scenario: Detect second output from named source with custom name # features/output.feature:245 When I set env variable "ARUBA_TEST_VAR" to "first" # features/step_definitions/aruba_dev_steps.rb:14 And I run `bash -c 'printf $ARUBA_TEST_VAR'` # lib/aruba/cucumber.rb:84 Then the output from "bash -c 'printf $ARUBA_TEST_VAR'" should contain "first" # lib/aruba/cucumber.rb:135 When I set env variable "ARUBA_TEST_VAR" to "second" # features/step_definitions/aruba_dev_steps.rb:14 And I run `bash -c 'printf $ARUBA_TEST_VAR'` # lib/aruba/cucumber.rb:84 Then the output from "bash -c 'printf $ARUBA_TEST_VAR'" should contain "second" # lib/aruba/cucumber.rb:135 Feature: UTF-8 Scenario: Write then assert on the content of a file with UTF-8 characters in # features/utf-8.feature:3 Given a file named "turning-japanese" with: # lib/aruba/cucumber.rb:24 """ ��������������� """ And I run `cat turning-japanese` # lib/aruba/cucumber.rb:84 Then the output should contain exactly: # lib/aruba/cucumber.rb:163 """ ��������������� """ 77 scenarios (77 passed) 223 steps (223 passed) 0m21.387s + rspec spec Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} ................................. Finished in 1.71 seconds 33 examples, 0 failures ~/build/BUILD/rubygem-aruba-0.5.4 + popd + exit 0 Processing files: rubygem-aruba-0.5.4-2.el7.noarch Provides: rubygem(aruba) = 0.5.4 rubygem-aruba = 0.5.4-2.el7 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Processing files: rubygem-aruba-doc-0.5.4-2.el7.noarch Provides: rubygem-aruba-doc = 0.5.4-2.el7 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/rubygem-aruba-0.5.4-2.el7.noarch Wrote: /builddir/build/RPMS/rubygem-aruba-0.5.4-2.el7.noarch.rpm Wrote: /builddir/build/RPMS/rubygem-aruba-doc-0.5.4-2.el7.noarch.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.CApX0p + umask 022 + cd /builddir/build/BUILD + cd rubygem-aruba-0.5.4 + /usr/bin/rm -rf /builddir/build/BUILDROOT/rubygem-aruba-0.5.4-2.el7.noarch + exit 0 Child return code was: 0 LEAVE do -->