Method: Cucumber::Formatter::Io#ensure_file
- Defined in:
- lib/cucumber/formatter/io.rb
#ensure_file(path, name) ⇒ Object
19 20 21 22 23 |
# File 'lib/cucumber/formatter/io.rb', line 19 def ensure_file(path, name) raise "You *must* specify --out FILE for the #{name} formatter" unless String === path raise "I can't write #{name} to a directory - it has to be a file" if File.directory?(path) ensure_io(path, name) end |