Avoid IO errors and output in the specs #203

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants

dasch commented Jul 13, 2012

  1. Makes sure the second argument to #run is writable.
  2. Makes the third argument a null sink in order to avoid output when the runs are aborted.

Before:

~/Projects/spork $ rspec                                                                                                                                                 (master)
.............../Users/dasch/Projects/spork/lib/spork/forker.rb:27:in `write': not opened for writing (IOError)
    from /Users/dasch/Projects/spork/lib/spork/forker.rb:27:in `puts'
    from /Users/dasch/Projects/spork/lib/spork/forker.rb:27:in `puts'
    from /Users/dasch/Projects/spork/lib/spork/forker.rb:27:in `rescue in block in initialize'
    from /Users/dasch/Projects/spork/lib/spork/forker.rb:19:in `block in initialize'
    from /Users/dasch/Projects/spork/lib/spork/forker.rb:18:in `fork'
    from /Users/dasch/Projects/spork/lib/spork/forker.rb:18:in `initialize'
    from /Users/dasch/Projects/spork/lib/spork/run_strategy/forking.rb:9:in `new'
    from /Users/dasch/Projects/spork/lib/spork/run_strategy/forking.rb:9:in `run'
    from /Users/dasch/Projects/spork/spec/spork/run_strategy/forking_spec.rb:19:in `block (3 levels) in <top (required)>'
./Users/dasch/Projects/spork/lib/spork/forker.rb:27:in `write': not opened for writing (IOError)
    from /Users/dasch/Projects/spork/lib/spork/forker.rb:27:in `puts'
    from /Users/dasch/Projects/spork/lib/spork/forker.rb:27:in `puts'
    from /Users/dasch/Projects/spork/lib/spork/forker.rb:27:in `rescue in block in initialize'
    from /Users/dasch/Projects/spork/lib/spork/forker.rb:19:in `block in initialize'
    from /Users/dasch/Projects/spork/lib/spork/forker.rb:18:in `fork'
    from /Users/dasch/Projects/spork/lib/spork/forker.rb:18:in `initialize'
    from /Users/dasch/Projects/spork/lib/spork/run_strategy/forking.rb:9:in `new'
    from /Users/dasch/Projects/spork/lib/spork/run_strategy/forking.rb:9:in `run'
    from /Users/dasch/Projects/spork/spec/spork/run_strategy/forking_spec.rb:31:in `block (3 levels) in <top (required)>'
....................................

Finished in 1.57 seconds
52 examples, 0 failures

After:

~/Projects/spork $ rspec                                                                                                                                       (fix-test-failure)
....................................................

Finished in 1.58 seconds
52 examples, 0 failures

dasch added some commits Jul 13, 2012

Avoid IO errors and output in the specs
1) Makes sure the second argument to #run is writable.
2) Makes the third argument a null sink in order to avoid output when
   the runs are aborted.
Contributor

sahilm commented Sep 14, 2013

Closing old pull requests. Please send new ones if this is still an issue.

@sahilm sahilm closed this Sep 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment