mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
15fe888069
This is another option we missed when moving things into the Configuration object. I had to make substantial changes to the tests, because many of them were using the stderr option for new connections. However, I think the end result is actually cleaner.
12 lines
216 B
Ruby
12 lines
216 B
Ruby
shared_examples_for "output writer" do
|
|
before do
|
|
@read, @write = IO.pipe
|
|
configure { |config| config.stderr = @write }
|
|
fork_connection
|
|
end
|
|
|
|
let(:stderr) do
|
|
@write.close
|
|
@read.read
|
|
end
|
|
end
|