Skip to content

Commit

Permalink
use raise instead of fail
Browse files Browse the repository at this point in the history
  • Loading branch information
lindt committed Mar 31, 2016
1 parent cff1103 commit f2304df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/gherkin_format
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ end.parse!
formatter = GherkinFormat.new

if options.key? :json
fail 'Provide exactly one file' unless ARGV.length == 1
raise 'Provide exactly one file' unless ARGV.length == 1
require 'multi_json'
feature = formatter.to_json(File.read(ARGV.first), ARGV.first)
puts MultiJson.dump feature.first
Expand Down
2 changes: 1 addition & 1 deletion lib/gherkin_format.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def format(file, options = {})
File.write(file, output) if options.key? :replace

puts "File #{file} is not formatted well."
fail "File #{file} is not formatted well."
raise "File #{file} is not formatted well."
end

def render(template, files)
Expand Down

0 comments on commit f2304df

Please sign in to comment.