Mock Version: 1.2.10 Mock Version: 1.2.10 ENTER do(['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/rubygem-aruba.spec'], chrootPath='/var/lib/mock/f23-build-3549449-493568/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=425user='mockbuild'timeout=86400logger=uid=1000) 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 warning: Could not canonicalize hostname: buildvm-09.phx2.fedoraproject.org Building target platforms: noarch Building for target noarch Wrote: /builddir/build/SRPMS/rubygem-aruba-0.6.2-2.fc23.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/f23-build-3549449-493568/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=425user='mockbuild'timeout=86400logger=uid=1000) 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.lbQhxI + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf rubygem-aruba-0.6.2 + /usr/bin/mkdir -p rubygem-aruba-0.6.2 + cd rubygem-aruba-0.6.2 + /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 -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'\'' ' + gem install -V --local --install-dir ./usr/share/gems --bindir ./usr/bin --force --document=ri,rdoc /builddir/build/SOURCES/aruba-0.6.2.gem /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/.document /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/.gitignore /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/.rspec /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/.rubocop.yml /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/.rvmrc /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/.travis.yml /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/CONTRIBUTING.md /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/Gemfile /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/History.md /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/LICENSE /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/README.md /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/Rakefile /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/aruba.gemspec /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/config/.gitignore /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/config/rubocop/exclude.yml /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/config/rubocop/include.yml /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/cucumber.yml /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/features/before_cmd_hooks.feature /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/features/command_environment_variables.feature /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/features/custom_ruby_process.feature /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/features/exit_statuses.feature /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/features/file_system_commands.feature /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/features/flushing.feature /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/features/interactive.feature /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/features/no_clobber.feature /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/features/output.feature /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/features/step_definitions/aruba_dev_steps.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/features/support/custom_main.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/features/support/env.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/features/support/jruby.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/features/utf-8.feature /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/lib/aruba.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/lib/aruba/api.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/lib/aruba/config.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/lib/aruba/cucumber.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/lib/aruba/cucumber/hooks.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/lib/aruba/errors.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/lib/aruba/in_process.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/lib/aruba/jruby.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/lib/aruba/matchers/rspec_matcher_include_regexp.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/lib/aruba/reporting.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/lib/aruba/spawn_process.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/spec/aruba/api_spec.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/spec/aruba/hooks_spec.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/spec/aruba/jruby_spec.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/spec/aruba/spawn_process_spec.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/spec/spec_helper.rb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/templates/css/console.css /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/templates/css/filesystem.css /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/templates/css/pygments-autumn.css /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/templates/files.erb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/templates/images/LICENSE /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/templates/images/folder.png /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/templates/images/page_white.png /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/templates/images/page_white_gherkin.png /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/templates/images/page_white_ruby.png /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/templates/index.erb /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/templates/js/filesystem.js /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/templates/js/jquery-1.6.1.min.js /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/templates/main.erb Successfully installed aruba-0.6.2 Parsing documentation for aruba-0.6.2 Parsing sources... 9% [ 1/11] lib/aruba.rb 18% [ 2/11] lib/aruba/api.rb 27% [ 3/11] lib/aruba/config.rb 36% [ 4/11] lib/aruba/cucumber.rb 45% [ 5/11] lib/aruba/cucumber/hooks.rb 54% [ 6/11] lib/aruba/errors.rb 63% [ 7/11] lib/aruba/in_process.rb 72% [ 8/11] lib/aruba/jruby.rb 81% [ 9/11] lib/aruba/matchers/rspec_matcher_include_regexp.rb 90% [10/11] lib/aruba/reporting.rb 100% [11/11] lib/aruba/spawn_process.rb Installing ri documentation for aruba-0.6.2 Installing darkfish documentation for aruba-0.6.2 Done installing documentation for aruba after 1 seconds 1 gem installed + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.EOVuX1 + umask 022 + cd /builddir/build/BUILD + cd rubygem-aruba-0.6.2 + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.JUTnol + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/rubygem-aruba-0.6.2-2.fc23.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/rubygem-aruba-0.6.2-2.fc23.noarch ++ dirname /builddir/build/BUILDROOT/rubygem-aruba-0.6.2-2.fc23.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/rubygem-aruba-0.6.2-2.fc23.noarch + cd rubygem-aruba-0.6.2 + mkdir -p /builddir/build/BUILDROOT/rubygem-aruba-0.6.2-2.fc23.noarch/usr/share/gems + cp -a ./usr/share/gems/build_info ./usr/share/gems/cache ./usr/share/gems/doc ./usr/share/gems/extensions ./usr/share/gems/gems ./usr/share/gems/specifications /builddir/build/BUILDROOT/rubygem-aruba-0.6.2-2.fc23.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.6.2 /usr/lib/rpm/sepdebugcrcfix: Updated 0 CRC32s, 0 CRC32s did match. + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/redhat/brp-java-repack-jars Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.zR8KpG + umask 022 + cd /builddir/build/BUILD + cd rubygem-aruba-0.6.2 + pushd ./usr/share/gems/gems/aruba-0.6.2 ~/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2 ~/build/BUILD/rubygem-aruba-0.6.2 + 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:29 """ $: << '../../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:93 Then it should pass with: # lib/aruba/cucumber.rb:205 """ 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:29 """ $: << '../../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:93 Then it should pass with: # lib/aruba/cucumber.rb:205 """ 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:79 | variable | value | | LONG_LONG_VARIABLE | long_value | When I run `/usr/bin/env` # lib/aruba/cucumber.rb:93 Then the output should contain: # lib/aruba/cucumber.rb:156 """ long_value """ Scenario: Mocked home directory # features/command_environment_variables.feature:17 Given a mocked home directory # lib/aruba/cucumber.rb:363 When I run `/usr/bin/env` # lib/aruba/cucumber.rb:93 Then the output should contain: # lib/aruba/cucumber.rb:156 """ tmp/aruba """ @mocked_home_directory Scenario: Mocked home directory # features/command_environment_variables.feature:26 When I run `/usr/bin/env` # lib/aruba/cucumber.rb:93 Then the output should contain: # lib/aruba/cucumber.rb:156 """ tmp/aruba """ 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:93 Then the output should contain "hello world" # lib/aruba/cucumber.rb:140 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:93 Then the exit status should be 0 # lib/aruba/cucumber.rb:197 Scenario: non-zero exit status # features/exit_statuses.feature:11 When I run `false` # lib/aruba/cucumber.rb:93 Then the exit status should be 1 # lib/aruba/cucumber.rb:197 And the exit status should not be 0 # lib/aruba/cucumber.rb:201 Scenario: Successfully run something # features/exit_statuses.feature:16 When I successfully run `true` # lib/aruba/cucumber.rb:104 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:104 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:20 When I run `file foo/bar` # lib/aruba/cucumber.rb:93 Then the stdout should contain "foo/bar: directory" # lib/aruba/cucumber.rb:246 Scenario: create a file # features/file_system_commands.feature:12 Given a file named "foo/bar/example.txt" with: # lib/aruba/cucumber.rb:29 """ hello world """ When I run `cat foo/bar/example.txt` # lib/aruba/cucumber.rb:93 Then the output should contain exactly "hello world" # lib/aruba/cucumber.rb:166 Scenario: create a fixed sized file # features/file_system_commands.feature:20 Given a 1048576 byte file named "test.txt" # lib/aruba/cucumber.rb:38 Then a 1048576 byte file named "test.txt" should exist # lib/aruba/cucumber.rb:323 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:29 """ hello world """ When I append to "foo/bar/example.txt" with: # lib/aruba/cucumber.rb:59 """ this was appended """ When I run `cat foo/bar/example.txt` # lib/aruba/cucumber.rb:93 Then the stdout should contain "hello world" # lib/aruba/cucumber.rb:246 And the stdout should contain "this was appended" # lib/aruba/cucumber.rb:246 Scenario: Append to a new file # features/file_system_commands.feature:47 When I append to "thedir/thefile" with "x" # lib/aruba/cucumber.rb:63 And I append to "thedir/thefile" with "y" # lib/aruba/cucumber.rb:63 Then the file "thedir/thefile" should contain "xy" # lib/aruba/cucumber.rb:339 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:295 Scenario: change to a subdir # features/file_system_commands.feature:55 Given a file named "foo/bar/example.txt" with: # lib/aruba/cucumber.rb:29 """ hello world """ When I cd to "foo/bar" # lib/aruba/cucumber.rb:75 And I run `cat example.txt` # lib/aruba/cucumber.rb:93 Then the output should contain "hello world" # lib/aruba/cucumber.rb:140 Scenario: Reset current directory from previous scenario # features/file_system_commands.feature:65 When I run `pwd` # lib/aruba/cucumber.rb:93 Then the output should match /\057tmp\057aruba$/ # lib/aruba/cucumber.rb:180 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:42 Given an empty file named "lorem/ipsum/sit" # lib/aruba/cucumber.rb:42 Given an empty file named "lorem/ipsum/amet" # lib/aruba/cucumber.rb:42 Then the following files should exist: # lib/aruba/cucumber.rb:299 | 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:303 | 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:42 Then a file named "lorem/ipsum/dolor" should exist # lib/aruba/cucumber.rb:307 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:311 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:319 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:42 Then a file matching %r should exist # lib/aruba/cucumber.rb:315 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:42 Then a file matching %r should exist # lib/aruba/cucumber.rb:315 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:20 Given a directory named "foo/bla" # lib/aruba/cucumber.rb:20 Then the following directories should exist: # lib/aruba/cucumber.rb:327 | 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:20 Given a directory named "foo/bla" # lib/aruba/cucumber.rb:20 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:20 Then a directory named "foo/bar" should exist # lib/aruba/cucumber.rb:335 Scenario: Check for absence of a single directory # features/file_system_commands.feature:124 Given a directory named "foo/bar" # lib/aruba/cucumber.rb:20 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 with text # features/file_system_commands.feature:131 Given a file named "foo" with: # lib/aruba/cucumber.rb:29 """ hello world """ Then the file "foo" should contain "hello world" # lib/aruba/cucumber.rb:339 And the file "foo" should not contain "HELLO WORLD" # lib/aruba/cucumber.rb:339 Scenario: Check file contents with regexp # features/file_system_commands.feature:139 Given a file named "foo" with: # lib/aruba/cucumber.rb:29 """ hello world """ Then the file "foo" should match /hel.o world/ # lib/aruba/cucumber.rb:351 And the file "foo" should not match /HELLO WORLD/ # lib/aruba/cucumber.rb:351 Scenario: Check file contents with docstring # features/file_system_commands.feature:147 Given a file named "foo" with: # lib/aruba/cucumber.rb:29 """ foo bar baz foobar """ Then the file "foo" should contain: # lib/aruba/cucumber.rb:343 """ bar baz """ Scenario: Check file contents with another file # features/file_system_commands.feature:161 Given a file named "foo" with: # lib/aruba/cucumber.rb:29 """ hello world """ And a file named "bar" with: # lib/aruba/cucumber.rb:29 """ hello world """ And a file named "nonbar" with: # lib/aruba/cucumber.rb:29 """ hello another world """ Then the file "foo" should be equal to file "bar" # lib/aruba/cucumber.rb:355 And the file "foo" should not be equal to file "nonbar" # lib/aruba/cucumber.rb:355 Scenario: Remove file # features/file_system_commands.feature:177 Given a file named "foo" with: # lib/aruba/cucumber.rb:29 """ hello world """ When I remove the file "foo" # lib/aruba/cucumber.rb:67 Then the file "foo" should not exist # lib/aruba/cucumber.rb:295 Scenario: Remove directory # features/file_system_commands.feature:185 Given a directory named "foo" # lib/aruba/cucumber.rb:20 When I remove the directory "foo" # lib/aruba/cucumber.rb:71 Then a directory named "foo" should not exist # lib/aruba/cucumber.rb:335 Scenario: Just a dummy for reporting # features/file_system_commands.feature:190 Given an empty file named "a/b.txt" # lib/aruba/cucumber.rb:42 Given an empty file named "a/b/c.txt" # lib/aruba/cucumber.rb:42 Given an empty file named "a/b/c/d.txt" # lib/aruba/cucumber.rb:42 Scenario: Change mode of empty file # features/file_system_commands.feature:195 Given an empty file named "test.txt" with mode "0666" # lib/aruba/cucumber.rb:46 Then the mode of filesystem object "test.txt" should match "0666" # lib/aruba/cucumber.rb:359 Scenario: Change mode of a directory # features/file_system_commands.feature:199 Given a directory named "test.d" with mode "0666" # lib/aruba/cucumber.rb:24 Then the mode of filesystem object "test.d" should match "0666" # lib/aruba/cucumber.rb:359 Scenario: Change mode of file # features/file_system_commands.feature:203 Given a file named "test.txt" with mode "0666" and with: # lib/aruba/cucumber.rb:33 """ asdf """ Then the mode of filesystem object "test.txt" should match "0666" # lib/aruba/cucumber.rb:359 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:93 Then the output should contain "a" # lib/aruba/cucumber.rb:140 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:197 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:93 Then the output should contain "a" # lib/aruba/cucumber.rb:140 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:197 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:113 And I type "65536" # lib/aruba/cucumber.rb:117 Then the output should contain "a" # lib/aruba/cucumber.rb:140 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:29 """ while res = gets.chomp break if res == "quit" puts res.reverse end """ When I run `ruby echo.rb` interactively # lib/aruba/cucumber.rb:113 And I type "hello, world" # lib/aruba/cucumber.rb:117 And I type "quit" # lib/aruba/cucumber.rb:117 Then it should pass with: # lib/aruba/cucumber.rb:205 """ dlrow ,olleh """ @posix Scenario: Running a native binary interactively # features/interactive.feature:25 When I run `cat` interactively # lib/aruba/cucumber.rb:113 And I type "Hello, world" # lib/aruba/cucumber.rb:117 And I type "" # lib/aruba/cucumber.rb:117 Then the output should contain: # lib/aruba/cucumber.rb:156 """ Hello, world """ @posix Scenario: Pipe in a file # features/interactive.feature:35 Given a file named "test.txt" with: # lib/aruba/cucumber.rb:29 """ line1 line2 """ When I run `cat` interactively # lib/aruba/cucumber.rb:113 And I pipe in the file "test.txt" # lib/aruba/cucumber.rb:125 Then the output should contain: # lib/aruba/cucumber.rb:156 """ line1 line2 """ @posix Scenario: Close stdin stream # features/interactive.feature:50 When I run `cat` interactively # lib/aruba/cucumber.rb:113 And I type "Hello, world" # lib/aruba/cucumber.rb:117 And I close the stdin stream # lib/aruba/cucumber.rb:121 Then the output should contain: # lib/aruba/cucumber.rb:156 """ 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:20 When I run `mv rename_me renamed` interactively # lib/aruba/cucumber.rb:113 Then a directory named "renamed" should exist # lib/aruba/cucumber.rb:335 And a directory named "rename_me" should not exist # lib/aruba/cucumber.rb:335 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:20 And a file named "foo/bar/baz.txt" with: # lib/aruba/cucumber.rb:29 """ 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:307 And the file "foo/bar/baz.txt" should contain exactly: # lib/aruba/cucumber.rb:347 """ 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:311 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:93 Then the output should contain "hello world" # lib/aruba/cucumber.rb:140 Scenario: Detect absence of one-line output # features/output.feature:12 When I run `printf "hello world"` # lib/aruba/cucumber.rb:93 Then the output should not contain "good-bye" # lib/aruba/cucumber.rb:152 Scenario: Detect subset of multiline output # features/output.feature:16 When I run `printf "hello\nworld"` # lib/aruba/cucumber.rb:93 Then the output should contain: # lib/aruba/cucumber.rb:156 """ hello """ Scenario: Detect absence of multiline output # features/output.feature:23 When I run `printf "hello\nworld"` # lib/aruba/cucumber.rb:93 Then the output should not contain: # lib/aruba/cucumber.rb:160 """ good-bye """ @posix Scenario: Detect exact one-line output # features/output.feature:31 When I run `printf "hello world"` # lib/aruba/cucumber.rb:93 Then the output should contain exactly: # lib/aruba/cucumber.rb:172 """ 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:93 Then the output should contain exactly: # lib/aruba/cucumber.rb:172 """ \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:93 Then the output should contain exactly: # lib/aruba/cucumber.rb:172 """ hello world """ @posix Scenario: Detect exact multiline output # features/output.feature:56 When I run `printf "hello\nworld"` # lib/aruba/cucumber.rb:93 Then the output should contain exactly: # lib/aruba/cucumber.rb:172 """ 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:93 $ cd /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/tmp/aruba $ printf "hello, ruby" hello, ruby Then the output should contain "ruby" # lib/aruba/cucumber.rb:140 And the output should match /^hello(, world)?/ # lib/aruba/cucumber.rb:180 @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:93 $ cd /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/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:184 """ 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:93 $ cd /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/tmp/aruba $ printf "hello, ruby" hello, ruby Then the output should contain "ruby" # lib/aruba/cucumber.rb:140 And the output should not match /ruby is a better perl$/ # lib/aruba/cucumber.rb:189 @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:93 $ cd /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/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:193 """ 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:93 $ cd /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/tmp/aruba $ printf "hello world" hello world Then it should pass with: # lib/aruba/cucumber.rb:205 """ hello """ @posix Scenario: Match passing exit status and exact output # features/output.feature:111 When I run `printf "hello\nworld"` # lib/aruba/cucumber.rb:93 Then it should pass with exactly: # lib/aruba/cucumber.rb:209 """ 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:93 hello world Then it should fail with: # lib/aruba/cucumber.rb:205 """ 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:93 Then it should fail with exactly: # lib/aruba/cucumber.rb:209 """ 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:93 hello world Then it should fail with regex: # lib/aruba/cucumber.rb:213 """ 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:93 $ printf "hello world" Then the stdout should contain "hello" # lib/aruba/cucumber.rb:246 Then the stderr should not contain "hello" # lib/aruba/cucumber.rb:266 @announce Scenario: Match output on several lines # features/output.feature:153 When I run `printf 'GET /'` # lib/aruba/cucumber.rb:93 $ cd /builddir/build/BUILD/rubygem-aruba-0.6.2/usr/share/gems/gems/aruba-0.6.2/tmp/aruba $ printf 'GET /' GET / Then the stdout should contain: # lib/aruba/cucumber.rb:258 """ GET / """ @posix Scenario: Match output on several lines using quotes # features/output.feature:161 When I run `printf 'GET "/"'` # lib/aruba/cucumber.rb:93 Then the stdout should contain: # lib/aruba/cucumber.rb:258 """ GET "/" """ @posix Scenario: Detect output from all processes # features/output.feature:169 When I run `printf "hello world!\n"` # lib/aruba/cucumber.rb:93 And I run `cat` interactively # lib/aruba/cucumber.rb:113 And I type "hola" # lib/aruba/cucumber.rb:117 And I type "" # lib/aruba/cucumber.rb:117 Then the output should contain exactly: # lib/aruba/cucumber.rb:172 """ 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:93 And I run `cat` interactively # lib/aruba/cucumber.rb:113 And I type "hola" # lib/aruba/cucumber.rb:117 And I type "" # lib/aruba/cucumber.rb:117 Then the stdout should contain: # lib/aruba/cucumber.rb:258 """ hello world! hola """ And the stderr should not contain anything # lib/aruba/cucumber.rb:274 @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:93 And I run `bash -c 'cat >&2 '` interactively # lib/aruba/cucumber.rb:113 And I type "hola" # lib/aruba/cucumber.rb:117 And I type "" # lib/aruba/cucumber.rb:117 Then the stderr should contain: # lib/aruba/cucumber.rb:234 """ hello world! hola """ And the stdout should not contain anything # lib/aruba/cucumber.rb:274 Scenario: Detect output from named source # features/output.feature:208 When I run `printf 'simple'` # lib/aruba/cucumber.rb:93 And I run `cat` interactively # lib/aruba/cucumber.rb:113 And I type "interactive" # lib/aruba/cucumber.rb:117 And I type "" # lib/aruba/cucumber.rb:117 Then the output from "printf 'simple'" should contain "simple" # lib/aruba/cucumber.rb:144 And the output from "printf 'simple'" should contain exactly "simple" # lib/aruba/cucumber.rb:166 And the output from "printf 'simple'" should contain exactly: # lib/aruba/cucumber.rb:172 """ simple """ And the output from "cat" should not contain "simple" # lib/aruba/cucumber.rb:148 Scenario: Detect stdout from named source # features/output.feature:221 When I run `printf 'hello'` # lib/aruba/cucumber.rb:93 And I run `printf 'goodbye'` # lib/aruba/cucumber.rb:93 Then the stdout from "printf 'hello'" should contain "hello" # lib/aruba/cucumber.rb:246 And the stdout from "printf 'hello'" should contain exactly "hello" # lib/aruba/cucumber.rb:246 And the stdout from "printf 'hello'" should contain exactly: # lib/aruba/cucumber.rb:258 """ hello """ And the stderr from "printf 'hello'" should not contain "hello" # lib/aruba/cucumber.rb:291 And the stdout from "printf 'goodbye'" should not contain "hello" # lib/aruba/cucumber.rb:287 Scenario: Detect stderr from named source # features/output.feature:233 When I run `bash -c 'printf hello >&2'` # lib/aruba/cucumber.rb:93 And I run `printf goodbye` # lib/aruba/cucumber.rb:93 Then the stderr from "bash -c 'printf hello >&2'" should contain "hello" # lib/aruba/cucumber.rb:222 And the stderr from "bash -c 'printf hello >&2'" should contain exactly "hello" # lib/aruba/cucumber.rb:222 And the stderr from "bash -c 'printf hello >&2'" should contain exactly: # lib/aruba/cucumber.rb:234 """ hello """ And the stdout from "bash -c 'printf hello >&2'" should not contain "hello" # lib/aruba/cucumber.rb:287 And the stderr from "printf goodbye" should not contain "hello" # lib/aruba/cucumber.rb:291 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:93 Then the output from "bash -c 'printf $ARUBA_TEST_VAR'" should contain "first" # lib/aruba/cucumber.rb:144 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:93 Then the output from "bash -c 'printf $ARUBA_TEST_VAR'" should contain "second" # lib/aruba/cucumber.rb:144 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:29 """ フィーチャ """ And I run `cat turning-japanese` # lib/aruba/cucumber.rb:93 Then the output should contain exactly: # lib/aruba/cucumber.rb:172 """ フィーチャ """ 81 scenarios (81 passed) 236 steps (236 passed) 0m15.875s + rspec spec Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} ................................................................... Finished in 1.74 seconds (files took 0.19387 seconds to load) 67 examples, 0 failures + popd ~/build/BUILD/rubygem-aruba-0.6.2 + exit 0 Processing files: rubygem-aruba-0.6.2-2.fc23.noarch Provides: rubygem(aruba) = 0.6.2 rubygem(aruba) = 0.6.2-1 rubygem-aruba = 0.6.2-2.fc23 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: ruby(rubygems) rubygem(childprocess) >= 0.3.6 rubygem(cucumber) >= 1.1.1 rubygem(rspec-expectations) >= 2.7.0 Processing files: rubygem-aruba-doc-0.6.2-2.fc23.noarch Provides: rubygem-aruba-doc = 0.6.2-2.fc23 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.6.2-2.fc23.noarch warning: Could not canonicalize hostname: buildvm-09.phx2.fedoraproject.org Wrote: /builddir/build/RPMS/rubygem-aruba-0.6.2-2.fc23.noarch.rpm Wrote: /builddir/build/RPMS/rubygem-aruba-doc-0.6.2-2.fc23.noarch.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.1Fe9DJ + umask 022 + cd /builddir/build/BUILD + cd rubygem-aruba-0.6.2 + /usr/bin/rm -rf /builddir/build/BUILDROOT/rubygem-aruba-0.6.2-2.fc23.noarch + exit 0 Child return code was: 0 LEAVE do -->