Skip to content

Commit

Permalink
Remove dead method argument
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwynne committed Aug 7, 2015
1 parent 6f083ee commit c1768eb
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/cucumber/formatter/html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Html
include Io

def initialize(runtime, path_or_io, options)
@io = ensure_io(path_or_io, "html")
@io = ensure_io(path_or_io)
@runtime = runtime
@options = options
@buffer = {}
Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/formatter/io.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Cucumber
module Formatter
module Io
def ensure_io(path_or_io, name)
def ensure_io(path_or_io)
return nil if path_or_io.nil?
return path_or_io if path_or_io.respond_to?(:write)
file = File.open(path_or_io, Cucumber.file_mode('w'))
Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/formatter/json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Json

def initialize(runtime, io, _options)
@runtime = runtime
@io = ensure_io(io, 'json')
@io = ensure_io(io)
@feature_hashes = []
end

Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/formatter/pretty.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Pretty
attr_reader :runtime

def initialize(runtime, path_or_io, options)
@runtime, @io, @options = runtime, ensure_io(path_or_io, "pretty"), options
@runtime, @io, @options = runtime, ensure_io(path_or_io), options
@exceptions = []
@indent = 0
@prefixes = options[:prefixes] || {}
Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/formatter/progress.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Progress
attr_reader :runtime

def initialize(runtime, path_or_io, options)
@runtime, @io, @options = runtime, ensure_io(path_or_io, "progress"), options
@runtime, @io, @options = runtime, ensure_io(path_or_io), options
@previous_step_keyword = nil
@snippets_input = []
@total_duration = 0
Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/formatter/rerun.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Rerun
include Formatter::Io

def initialize(runtime, path_or_io, options)
@io = ensure_io(path_or_io, "rerun")
@io = ensure_io(path_or_io)
@failures = {}
@options = options
end
Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/formatter/steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Formatter
class Steps

def initialize(runtime, path_or_io, options)
@io = ensure_io(path_or_io, "steps")
@io = ensure_io(path_or_io)
@options = options
@step_definition_files = collect_steps(runtime)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/formatter/usage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class StepDefKey < StepDefinitionLight

def initialize(runtime, path_or_io, options)
@runtime = runtime
@io = ensure_io(path_or_io, "usage")
@io = ensure_io(path_or_io)
@options = options
@stepdef_to_match = Hash.new { |h, stepdef_key| h[stepdef_key] = [] }
@total_duration = 0
Expand Down

0 comments on commit c1768eb

Please sign in to comment.