Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Issue:
- Without that sleep 0.1 - this test fails more often than passes.
- With the sleep if passes every time.
- ### test
- require 'spec_helper'
- RSpec.describe 'testing file writing', :type => :aruba do
- let!(:test_file) { 'out.txt' }
- let!(:directory) { 'test_write' }
- before(:each) {
- setup_aruba
- create_directory(directory)
- set_environment_variable 'TMP_DIR', expand_path(directory)
- }
- it 'should write a file' do
- run 'test_write.bash'
- sleep 0.1
- expect(file?("#{directory}/out.txt")).to be true
- end
- end
- ### test_write.bash
- #!/bin/bash
- echo hello_world > $TMP_DIR/out.txt
- ### Gemfile.lock
- $ cat Gemfile.lock
- GEM
- remote: https://rubygems.org/
- specs:
- aruba (0.9.0)
- childprocess (~> 0.5.6)
- contracts (~> 0.9)
- cucumber (>= 1.3.19)
- ffi (~> 1.9.10)
- rspec-expectations (>= 2.99)
- thor (~> 0.19)
- builder (3.2.2)
- childprocess (0.5.6)
- ffi (~> 1.0, >= 1.0.11)
- coderay (1.1.0)
- contracts (0.12.0)
- cucumber (2.1.0)
- builder (>= 2.1.2)
- cucumber-core (~> 1.3.0)
- diff-lcs (>= 1.1.3)
- gherkin3 (~> 3.1.0)
- multi_json (>= 1.7.5, < 2.0)
- multi_test (>= 0.1.2)
- cucumber-core (1.3.0)
- gherkin3 (~> 3.1.0)
- diff-lcs (1.2.5)
- ffi (1.9.10)
- gherkin3 (3.1.2)
- json (1.8.1)
- method_source (0.8.2)
- multi_json (1.11.2)
- multi_test (0.1.2)
- pry (0.10.3)
- coderay (~> 1.1.0)
- method_source (~> 0.8.1)
- slop (~> 3.4)
- rspec (3.3.0)
- rspec-core (~> 3.3.0)
- rspec-expectations (~> 3.3.0)
- rspec-mocks (~> 3.3.0)
- rspec-core (3.3.2)
- rspec-support (~> 3.3.0)
- rspec-expectations (3.3.1)
- diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.3.0)
- rspec-mocks (3.3.2)
- diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.3.0)
- rspec-support (3.3.0)
- slop (3.6.0)
- thor (0.19.1)
- PLATFORMS
- ruby
- DEPENDENCIES
- aruba
- json
- pry
- rspec
- BUNDLED WITH
- 1.10.6
- #ruby
- ruby 2.2.3p173
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement