Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2015
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. Issue:
  2. Without that sleep 0.1 - this test fails more often than passes.
  3. With the sleep if passes every time.
  4.  
  5. ### test
  6. require 'spec_helper'
  7.  
  8. RSpec.describe 'testing file writing', :type => :aruba do
  9. let!(:test_file) { 'out.txt' }
  10. let!(:directory) { 'test_write' }
  11. before(:each) {
  12. setup_aruba
  13. create_directory(directory)
  14. set_environment_variable 'TMP_DIR', expand_path(directory)
  15. }
  16. it 'should write a file' do
  17. run 'test_write.bash'
  18. sleep 0.1
  19. expect(file?("#{directory}/out.txt")).to be true
  20. end
  21. end
  22.  
  23.  
  24.  
  25. ### test_write.bash
  26. #!/bin/bash
  27. echo hello_world > $TMP_DIR/out.txt
  28.  
  29.  
  30. ### Gemfile.lock
  31. $ cat Gemfile.lock
  32. GEM
  33. remote: https://rubygems.org/
  34. specs:
  35. aruba (0.9.0)
  36. childprocess (~> 0.5.6)
  37. contracts (~> 0.9)
  38. cucumber (>= 1.3.19)
  39. ffi (~> 1.9.10)
  40. rspec-expectations (>= 2.99)
  41. thor (~> 0.19)
  42. builder (3.2.2)
  43. childprocess (0.5.6)
  44. ffi (~> 1.0, >= 1.0.11)
  45. coderay (1.1.0)
  46. contracts (0.12.0)
  47. cucumber (2.1.0)
  48. builder (>= 2.1.2)
  49. cucumber-core (~> 1.3.0)
  50. diff-lcs (>= 1.1.3)
  51. gherkin3 (~> 3.1.0)
  52. multi_json (>= 1.7.5, < 2.0)
  53. multi_test (>= 0.1.2)
  54. cucumber-core (1.3.0)
  55. gherkin3 (~> 3.1.0)
  56. diff-lcs (1.2.5)
  57. ffi (1.9.10)
  58. gherkin3 (3.1.2)
  59. json (1.8.1)
  60. method_source (0.8.2)
  61. multi_json (1.11.2)
  62. multi_test (0.1.2)
  63. pry (0.10.3)
  64. coderay (~> 1.1.0)
  65. method_source (~> 0.8.1)
  66. slop (~> 3.4)
  67. rspec (3.3.0)
  68. rspec-core (~> 3.3.0)
  69. rspec-expectations (~> 3.3.0)
  70. rspec-mocks (~> 3.3.0)
  71. rspec-core (3.3.2)
  72. rspec-support (~> 3.3.0)
  73. rspec-expectations (3.3.1)
  74. diff-lcs (>= 1.2.0, < 2.0)
  75. rspec-support (~> 3.3.0)
  76. rspec-mocks (3.3.2)
  77. diff-lcs (>= 1.2.0, < 2.0)
  78. rspec-support (~> 3.3.0)
  79. rspec-support (3.3.0)
  80. slop (3.6.0)
  81. thor (0.19.1)
  82.  
  83. PLATFORMS
  84. ruby
  85.  
  86. DEPENDENCIES
  87. aruba
  88. json
  89. pry
  90. rspec
  91.  
  92. BUNDLED WITH
  93. 1.10.6
  94.  
  95. #ruby
  96. ruby 2.2.3p173
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement