inch 0.4.6 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +15 -0
  3. data/.rubocop_todo.yml +113 -0
  4. data/CHANGELOG.md +6 -0
  5. data/Gemfile +5 -2
  6. data/README.md +2 -2
  7. data/Rakefile +2 -2
  8. data/bin/inch +3 -2
  9. data/config/defaults.rb +7 -0
  10. data/inch.gemspec +7 -7
  11. data/lib/inch.rb +9 -10
  12. data/lib/inch/api.rb +10 -10
  13. data/lib/inch/api/compare.rb +2 -2
  14. data/lib/inch/api/compare/code_objects.rb +2 -3
  15. data/lib/inch/api/compare/codebases.rb +1 -1
  16. data/lib/inch/api/diff.rb +6 -9
  17. data/lib/inch/api/options/base.rb +4 -4
  18. data/lib/inch/api/options/suggest.rb +1 -1
  19. data/lib/inch/api/stats.rb +0 -1
  20. data/lib/inch/api/suggest.rb +8 -9
  21. data/lib/inch/cli.rb +6 -6
  22. data/lib/inch/cli/command.rb +15 -15
  23. data/lib/inch/cli/command/base.rb +2 -2
  24. data/lib/inch/cli/command/console.rb +5 -5
  25. data/lib/inch/cli/command/diff.rb +7 -8
  26. data/lib/inch/cli/command/inspect.rb +5 -4
  27. data/lib/inch/cli/command/list.rb +4 -4
  28. data/lib/inch/cli/command/options/base.rb +8 -8
  29. data/lib/inch/cli/command/options/base_list.rb +9 -5
  30. data/lib/inch/cli/command/options/console.rb +4 -3
  31. data/lib/inch/cli/command/options/diff.rb +6 -4
  32. data/lib/inch/cli/command/options/inspect.rb +2 -2
  33. data/lib/inch/cli/command/options/list.rb +4 -3
  34. data/lib/inch/cli/command/options/show.rb +2 -2
  35. data/lib/inch/cli/command/options/stats.rb +2 -1
  36. data/lib/inch/cli/command/options/suggest.rb +6 -3
  37. data/lib/inch/cli/command/output/base.rb +2 -4
  38. data/lib/inch/cli/command/output/console.rb +4 -5
  39. data/lib/inch/cli/command/output/diff.rb +6 -6
  40. data/lib/inch/cli/command/output/inspect.rb +6 -8
  41. data/lib/inch/cli/command/output/list.rb +0 -1
  42. data/lib/inch/cli/command/output/show.rb +4 -5
  43. data/lib/inch/cli/command/output/stats.rb +21 -21
  44. data/lib/inch/cli/command/output/suggest.rb +28 -26
  45. data/lib/inch/cli/command/show.rb +4 -4
  46. data/lib/inch/cli/command/stats.rb +4 -4
  47. data/lib/inch/cli/command/suggest.rb +6 -6
  48. data/lib/inch/cli/command_parser.rb +6 -5
  49. data/lib/inch/cli/sparkline_helper.rb +2 -2
  50. data/lib/inch/cli/trace_helper.rb +1 -1
  51. data/lib/inch/cli/yardopts_helper.rb +4 -3
  52. data/lib/inch/code_object.rb +3 -3
  53. data/lib/inch/code_object/converter.rb +6 -8
  54. data/lib/inch/code_object/provider.rb +1 -1
  55. data/lib/inch/code_object/provider/yard.rb +10 -12
  56. data/lib/inch/code_object/provider/yard/docstring.rb +53 -21
  57. data/lib/inch/code_object/provider/yard/nodoc_helper.rb +3 -3
  58. data/lib/inch/code_object/provider/yard/object.rb +11 -9
  59. data/lib/inch/code_object/provider/yard/object/base.rb +33 -9
  60. data/lib/inch/code_object/provider/yard/object/class_variable_object.rb +12 -0
  61. data/lib/inch/code_object/provider/yard/object/method_object.rb +36 -11
  62. data/lib/inch/code_object/provider/yard/object/method_parameter_object.rb +2 -2
  63. data/lib/inch/code_object/provider/yard/object/method_signature.rb +11 -8
  64. data/lib/inch/code_object/provider/yard/object/namespace_object.rb +1 -4
  65. data/lib/inch/code_object/provider/yard/parser.rb +2 -2
  66. data/lib/inch/code_object/proxy.rb +10 -9
  67. data/lib/inch/code_object/proxy/base.rb +8 -8
  68. data/lib/inch/code_object/proxy/class_variable_object.rb +8 -0
  69. data/lib/inch/code_object/proxy/method_object.rb +3 -2
  70. data/lib/inch/code_object/proxy/method_parameter_object.rb +1 -1
  71. data/lib/inch/codebase.rb +4 -5
  72. data/lib/inch/codebase/objects_filter.rb +2 -4
  73. data/lib/inch/codebase/serializer.rb +3 -3
  74. data/lib/inch/config.rb +2 -2
  75. data/lib/inch/config/base.rb +0 -1
  76. data/lib/inch/config/codebase.rb +3 -3
  77. data/lib/inch/core_ext.rb +1 -1
  78. data/lib/inch/core_ext/string.rb +1 -1
  79. data/lib/inch/evaluation.rb +16 -15
  80. data/lib/inch/evaluation/grade_list.rb +2 -2
  81. data/lib/inch/evaluation/object_schema.rb +1 -1
  82. data/lib/inch/evaluation/proxy.rb +8 -7
  83. data/lib/inch/evaluation/proxy/base.rb +12 -7
  84. data/lib/inch/evaluation/proxy/class_variable_object.rb +19 -0
  85. data/lib/inch/evaluation/proxy/constant_object.rb +1 -1
  86. data/lib/inch/evaluation/proxy/method_object.rb +12 -5
  87. data/lib/inch/evaluation/proxy/module_object.rb +1 -1
  88. data/lib/inch/evaluation/proxy/namespace_object.rb +1 -1
  89. data/lib/inch/evaluation/role/base.rb +1 -1
  90. data/lib/inch/evaluation/role/class_variable.rb +55 -0
  91. data/lib/inch/evaluation/role/method.rb +0 -1
  92. data/lib/inch/evaluation/role/method_parameter.rb +2 -1
  93. data/lib/inch/evaluation/role/object.rb +2 -2
  94. data/lib/inch/rake.rb +2 -2
  95. data/lib/inch/rake/suggest.rb +2 -2
  96. data/lib/inch/utils/shell_helper.rb +1 -1
  97. data/lib/inch/utils/ui.rb +5 -5
  98. data/lib/inch/utils/weighted_list.rb +2 -3
  99. data/lib/inch/version.rb +1 -1
  100. data/test/fixtures/simple/lib/broken.rb +35 -7
  101. data/test/fixtures/simple/lib/broken_ruby_2_0_features.rb +7 -0
  102. data/test/fixtures/simple/lib/directives.rb +8 -0
  103. data/test/fixtures/simple/lib/foo.rb +17 -0
  104. data/test/integration/api/compare/codebases.rb +1 -1
  105. data/test/integration/cli/command/console_test.rb +5 -5
  106. data/test/integration/cli/command/inspect_test.rb +4 -5
  107. data/test/integration/cli/command/list_test.rb +3 -4
  108. data/test/integration/cli/command/show_test.rb +4 -4
  109. data/test/integration/cli/command/stats_test.rb +2 -2
  110. data/test/integration/cli/command/suggest_test.rb +7 -7
  111. data/test/integration/stats_options_test.rb +3 -3
  112. data/test/integration/visibility_options_test.rb +13 -13
  113. data/test/shared/base_list.rb +4 -3
  114. data/test/test_helper.rb +16 -5
  115. data/test/unit/api/filter_test.rb +7 -7
  116. data/test/unit/api/get_test.rb +1 -1
  117. data/test/unit/api/list_test.rb +1 -1
  118. data/test/unit/api/options/base_test.rb +3 -3
  119. data/test/unit/api/stats_test.rb +1 -1
  120. data/test/unit/api/suggest_test.rb +3 -3
  121. data/test/unit/cli/arguments_test.rb +1 -1
  122. data/test/unit/cli/command/base_test.rb +1 -1
  123. data/test/unit/cli/command/options/base_list_test.rb +2 -2
  124. data/test/unit/cli/command/options/base_object_test.rb +1 -1
  125. data/test/unit/cli/command/options/base_test.rb +1 -1
  126. data/test/unit/cli/command_parser_test.rb +2 -2
  127. data/test/unit/cli/trace_helper_test.rb +1 -1
  128. data/test/unit/cli/yardopts_helper_test.rb +4 -3
  129. data/test/unit/code_object/converter_test.rb +1 -1
  130. data/test/unit/code_object/provider/yard/docstring_test.rb +105 -28
  131. data/test/unit/code_object/provider/yard/nodoc_helper_test.rb +5 -5
  132. data/test/unit/code_object/provider/yard/object/method_object_test.rb +20 -10
  133. data/test/unit/code_object/provider/yard_test.rb +4 -4
  134. data/test/unit/code_object/provider_test.rb +1 -1
  135. data/test/unit/code_object/proxy/method_object_test.rb +366 -262
  136. data/test/unit/code_object/proxy_test.rb +1 -1
  137. data/test/unit/codebase/objects_test.rb +2 -2
  138. data/test/unit/codebase/proxy_test.rb +1 -1
  139. data/test/unit/config/codebase_test.rb +1 -1
  140. data/test/unit/evaluation/role/base_test.rb +1 -1
  141. data/test/unit/utils/ui_test.rb +4 -4
  142. data/test/unit/utils/weighted_list_test.rb +7 -4
  143. metadata +12 -2
@@ -0,0 +1,19 @@
1
+ module Inch
2
+ module Evaluation
3
+ module Proxy
4
+ class ClassVariableObject < Base
5
+ protected
6
+
7
+ def relevant_roles
8
+ {
9
+ Role::ClassVariable::WithDoc => score_for(:docstring),
10
+ Role::ClassVariable::WithoutDoc => score_for(:docstring),
11
+ Role::ClassVariable::TaggedAsNodoc => nil,
12
+ Role::ClassVariable::Public => nil,
13
+ Role::ClassVariable::Private => nil
14
+ }
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -10,7 +10,7 @@ module Inch
10
10
  Role::Constant::WithoutDoc => score_for(:docstring),
11
11
  Role::Constant::TaggedAsNodoc => nil,
12
12
  Role::Constant::Public => nil,
13
- Role::Constant::Private => nil,
13
+ Role::Constant::Private => nil
14
14
  }
15
15
  end
16
16
  end
@@ -29,17 +29,24 @@ module Inch
29
29
  Role::Method::Constructor => nil,
30
30
  Role::Method::Getter => nil,
31
31
  Role::Method::Setter => nil,
32
- Role::Method::Overridden => object.overridden? ? object.overridden_method.score : nil,
32
+ Role::Method::Overridden =>
33
+ if object.overridden?
34
+ object.overridden_method.score
35
+ else
36
+ nil
37
+ end,
33
38
  Role::Method::WithManyLines => nil,
34
39
  Role::Method::WithBangName => nil,
35
40
  Role::Method::WithQuestioningName => nil,
36
41
  Role::Method::HasAlias => nil,
37
42
  Role::Method::WithReturnType => score_for(:return_type),
38
43
  Role::Method::WithoutReturnType => score_for(:return_type),
39
- Role::Method::WithReturnDescription => score_for(:return_description),
40
- Role::Method::WithoutReturnDescription => score_for(:return_description),
44
+ Role::Method::WithReturnDescription =>
45
+ score_for(:return_description),
46
+ Role::Method::WithoutReturnDescription =>
47
+ score_for(:return_description),
41
48
  Role::Method::WithoutParameters => score_for(:parameters),
42
- Role::Method::WithManyParameters => nil,
49
+ Role::Method::WithManyParameters => nil
43
50
  }
44
51
  end
45
52
 
@@ -52,7 +59,7 @@ module Inch
52
59
  Role::MethodParameter::WithoutType => per_param * 0.5,
53
60
  Role::MethodParameter::WithBadName => nil,
54
61
  Role::MethodParameter::Block => nil,
55
- Role::MethodParameter::Splat => nil,
62
+ Role::MethodParameter::Splat => nil
56
63
  }
57
64
  end
58
65
 
@@ -5,4 +5,4 @@ module Inch
5
5
  end
6
6
  end
7
7
  end
8
- end
8
+ end
@@ -18,7 +18,7 @@ module Inch
18
18
  Role::Namespace::WithChildren => nil,
19
19
  Role::Namespace::WithManyChildren => nil,
20
20
  Role::Namespace::WithoutMethods => nil,
21
- Role::Namespace::Pure => nil,
21
+ Role::Namespace::Pure => nil
22
22
  }
23
23
  end
24
24
  end
@@ -84,7 +84,7 @@ module Inch
84
84
  end
85
85
 
86
86
  def object_type
87
- object.class.to_s.split('::').last.gsub(/Object$/, '').downcase
87
+ object.class.to_s.split("::").last.gsub(/Object$/, "").downcase
88
88
  end
89
89
  end
90
90
  end
@@ -0,0 +1,55 @@
1
+ module Inch
2
+ module Evaluation
3
+ module Role
4
+ # Roles assigned to class variables
5
+ module ClassVariable
6
+ class WithDoc < Object::WithDoc
7
+ applicable_if :has_doc?
8
+ end
9
+ class WithoutDoc < Object::WithoutDoc
10
+ applicable_unless :has_doc?
11
+ end
12
+
13
+ class TaggedAsNodoc < Object::TaggedAsNodoc
14
+ applicable_if :nodoc?
15
+ end
16
+ class InRoot < Object::InRoot
17
+ applicable_if :in_root?
18
+ end
19
+
20
+ class Public < Object::Public
21
+ applicable_if :public?
22
+
23
+ def priority
24
+ -1
25
+ end
26
+ end
27
+ class Private < Object::Private
28
+ applicable_if :private?
29
+
30
+ def priority
31
+ -3
32
+ end
33
+ end
34
+
35
+ class WithCodeExample < Object::WithCodeExample
36
+ applicable_if do |o|
37
+ o.has_code_example? && !o.has_multiple_code_examples?
38
+ end
39
+ end
40
+
41
+ class WithMultipleCodeExamples < Object::WithMultipleCodeExamples
42
+ applicable_if :has_multiple_code_examples?
43
+ end
44
+
45
+ class WithoutCodeExample < Object::WithoutCodeExample
46
+ applicable_unless :has_code_example?
47
+
48
+ def suggestion
49
+ nil
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -46,7 +46,6 @@ module Inch
46
46
  end
47
47
  end
48
48
 
49
-
50
49
  # Role assigned to methods with many lines
51
50
  #
52
51
  # @see CodeObject::Proxy::MethodObject#has_many_lines?
@@ -67,7 +67,8 @@ module Inch
67
67
  applicable_if :wrongly_mentioned?
68
68
 
69
69
  def suggestion
70
- "The parameter '#{object.name}' seems not to be part of the signature."
70
+ "The parameter '#{object.name}' seems not to be part of the " \
71
+ "signature."
71
72
  end
72
73
 
73
74
  def priority
@@ -53,8 +53,8 @@ module Inch
53
53
  end
54
54
 
55
55
  # Role assigned to objects explicitly or implicitly tagged to be part
56
- # of an API. If the API is 'private'/'internal' TaggedAsInternalAPI is assigned
57
- # instead.
56
+ # of an API. If the API is 'private'/'internal' TaggedAsInternalAPI is
57
+ # assigned instead.
58
58
  class TaggedAsAPI < Base
59
59
  applicable_if :api_tag?
60
60
  end
@@ -1,2 +1,2 @@
1
- require 'inch'
2
- require 'inch/rake/suggest'
1
+ require "inch"
2
+ require "inch/rake/suggest"
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'rake'
4
- require 'rake/tasklib'
3
+ require "rake"
4
+ require "rake/tasklib"
5
5
 
6
6
  module Inch
7
7
  # Holds all Rake tasks
@@ -3,7 +3,7 @@ module Inch
3
3
  module ShellHelper
4
4
  def git(dir, command)
5
5
  Dir.chdir(dir) do
6
- out = sh("git #{command}")
6
+ sh("git #{command}")
7
7
  end
8
8
  end
9
9
 
@@ -10,9 +10,9 @@ module Inch
10
10
  end
11
11
 
12
12
  def debug(msg)
13
- return unless ENV['DEBUG']
13
+ return unless ENV["DEBUG"]
14
14
  msg.to_s.lines.each do |line|
15
- trace edged :dark, line.gsub(/\n$/,'').dark
15
+ trace edged :dark, line.gsub(/\n$/, "").dark
16
16
  end
17
17
  end
18
18
 
@@ -45,12 +45,12 @@ module Inch
45
45
  def header(text, color, bg_color = nil)
46
46
  @current_header_color = color
47
47
  trace __header(text, color, bg_color)
48
- trace if !use_color?
48
+ trace unless use_color?
49
49
  end
50
50
 
51
51
  # @return [Boolean] true if the UI uses coloring
52
52
  def use_color?
53
- Term::ANSIColor::coloring?
53
+ Term::ANSIColor.coloring?
54
54
  end
55
55
 
56
56
  private
@@ -61,7 +61,7 @@ module Inch
61
61
 
62
62
  def __header(text, color, bg_color = nil)
63
63
  bg_color ||= "intense_#{color}"
64
- bar = " #{text}".ljust(CLI::COLUMNS-1)
64
+ bar = " #{text}".ljust(CLI::COLUMNS - 1)
65
65
  .on_color(bg_color).color(:color16)
66
66
  "#".color(color).on_color(color) + bar
67
67
  end
@@ -74,9 +74,8 @@ module Inch
74
74
  target_count = @max_counts[index]
75
75
  @list[index].concat sublist[0...target_count]
76
76
 
77
- if sublist.size < target_count
78
- missing += target_count - sublist.size
79
- end
77
+ next unless sublist.size < target_count
78
+ missing += target_count - sublist.size
80
79
  end
81
80
  missing
82
81
  end
@@ -1,3 +1,3 @@
1
1
  module Inch
2
- VERSION = "0.4.6"
2
+ VERSION = "0.4.7"
3
3
  end
@@ -1,4 +1,7 @@
1
1
  module Foo
2
+ # Determines :class_variable
3
+ @@class_variable = {Ace: 11, Jack: 10, Queen: 10, King: 10}
4
+
2
5
  # The problem here is that the @param tag is not given the name of the
3
6
  # parameter it documents.
4
7
  #
@@ -15,13 +18,6 @@ module Foo
15
18
  def method_with_empty_param_tag_text(e)
16
19
  end
17
20
 
18
- # The problem here is that ...
19
- #
20
- # @param *names [Array]
21
- # @return [String]
22
- def method_with_splat_parameter(*names)
23
- end
24
-
25
21
  # The problem here is that ...
26
22
  #
27
23
  # @param names [Array]
@@ -34,9 +30,41 @@ module Foo
34
30
  # @return HasH
35
31
  def method_with_wrong_return_tag
36
32
  end
33
+
34
+ # The problem here is that ...
35
+ #
36
+ # @param *names [Array]
37
+ # @return [String]
38
+ def method_with_splat_parameter(*names)
39
+ end
40
+
41
+ # Initializes a new Connection instance
42
+ # @param [Hash<Symbol, >] params One or more optional params
43
+ # @option params [String] :body Default text to be sent over a socket. Only used if :body absent in Connection#request params
44
+ # @option params [Hash<Symbol, String>] :headers The default headers to supply in a request. Only used if params[:headers] is not supplied to Connection#request
45
+ def method_with_indented_param_tag(params = {})
46
+ end
37
47
  end
38
48
 
39
49
  module Overloading
50
+ # @overload many_overloads(&block)
51
+ # @overload many_overloads(scope, &block)
52
+ # @param scope [Symbol] `:example`, `:context`, or `:suite` (defaults to `:example`)
53
+ # @overload many_overloads(scope, conditions, &block)
54
+ # @param scope [Symbol] `:example`, `:context`, or `:suite` (defaults to `:example`)
55
+ # @param conditions [Hash]
56
+ # constrains this hook to examples matching these conditions e.g.
57
+ # `many_overloads(:example, :ui => true) { ... }` will only run with examples or
58
+ # groups declared with `:ui => true`.
59
+ # @overload many_overloads(conditions, &block)
60
+ # @param conditions [Hash]
61
+ # constrains this hook to examples matching these conditions e.g.
62
+ # `many_overloads(:example, :ui => true) { ... }` will only run with examples or
63
+ # groups declared with `:ui => true`.
64
+ def many_overloads(*args, &block)
65
+ hooks.register :append, :before, *args, &block
66
+ end
67
+
40
68
  # Creates a {Sass::Script::Value::Color Color} object from red, green, and
41
69
  # blue values.
42
70
  #
@@ -0,0 +1,7 @@
1
+ module Foo
2
+ # Redirect to the given URL
3
+ # @param url [String] the destination URL
4
+ # @param status [Fixnum] the http code
5
+ def method_with_named_parameter(url, status: 302)
6
+ end
7
+ end
@@ -0,0 +1,8 @@
1
+ # Representation of attributes of a user in the database
2
+ #
3
+ # @!attribute email
4
+ # @return [String] E-mail address (from Devise)
5
+ class Attributes
6
+ # @return [String] Username (from Devise)
7
+ attr_accessor :username
8
+ end
@@ -72,6 +72,23 @@ module Foo
72
72
  def method_with_other_rdoc_doc(param1, param2, param3)
73
73
  end
74
74
 
75
+ # Injects text right after the class definition. Since it depends on
76
+ # insert_into_file, it's reversible.
77
+ #
78
+ # ==== Parameters
79
+ # param1<String>:: path of the file to be changed
80
+ # param2<String|Class>:: the class to be manipulated
81
+ #
82
+ # ==== Examples
83
+ #
84
+ # inject_into_class "app/controllers/application_controller.rb", ApplicationController, " filter_parameter :password\n"
85
+ #
86
+ # inject_into_class "app/controllers/application_controller.rb", ApplicationController do
87
+ # " filter_parameter :password\n"
88
+ # end
89
+ def method_with_yet_another_rdoc_doc(param1, param2)
90
+ end
91
+
75
92
  # An example of a method that takes a parameter (+param1+)
76
93
  # and does nothing. But the previous sentence mentions said
77
94
  # parameter.
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../test_helper')
1
+ require File.expand_path(File.dirname(__FILE__) + "/../../../test_helper")
2
2
 
3
3
  describe ::Inch::API::Compare::Codebases do
4
4
  let(:described_class) { ::Inch::API::Compare::Codebases }
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../test_helper')
1
+ require File.expand_path(File.dirname(__FILE__) + "/../../../test_helper")
2
2
 
3
3
  class Inch::CLI::Command::Output::Console
4
4
  def run_pry
@@ -22,8 +22,8 @@ describe ::Inch::CLI::Command::Console do
22
22
  end
23
23
 
24
24
  it "should run without args" do
25
- out, err = capture_io do
26
- @prompt = @command.new.run()
25
+ _out, _err = capture_io do
26
+ @prompt = @command.new.run
27
27
  end
28
28
  assert @prompt.respond_to?(:all)
29
29
  assert @prompt.respond_to?(:ff)
@@ -34,7 +34,7 @@ describe ::Inch::CLI::Command::Console do
34
34
  end
35
35
 
36
36
  it "should run with a definitive object name" do
37
- out, err = capture_io do
37
+ _out, _err = capture_io do
38
38
  @prompt = @command.new.run("Foo::Bar#method_with_full_doc")
39
39
  end
40
40
  assert !@prompt.all.empty?
@@ -46,7 +46,7 @@ describe ::Inch::CLI::Command::Console do
46
46
  end
47
47
 
48
48
  it "should run with a partial name" do
49
- out, err = capture_io do
49
+ _out, _err = capture_io do
50
50
  @prompt = @command.new.run("Foo::Bar#")
51
51
  end
52
52
  assert @prompt.respond_to?(:all)
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../test_helper')
1
+ require File.expand_path(File.dirname(__FILE__) + "/../../../test_helper")
2
2
 
3
3
  describe ::Inch::CLI::Command::Inspect do
4
4
  before do
@@ -8,7 +8,7 @@ describe ::Inch::CLI::Command::Inspect do
8
8
 
9
9
  it "should warn and exit when run without args" do
10
10
  out, err = capture_io do
11
- assert_raises(SystemExit) { @command.run() }
11
+ assert_raises(SystemExit) { @command.run }
12
12
  end
13
13
  assert out.empty?, "there should be no output"
14
14
  refute err.empty?, "there should be some error message"
@@ -33,7 +33,6 @@ describe ::Inch::CLI::Command::Inspect do
33
33
  assert err.empty?, "there should be no errors"
34
34
  end
35
35
 
36
-
37
36
  it "should output some info when run with a definitive object name" do
38
37
  out, err = capture_io do
39
38
  @command.run("Foo::Qux")
@@ -53,14 +52,14 @@ describe ::Inch::CLI::Command::Inspect do
53
52
  end
54
53
 
55
54
  it "should output colored information" do
56
- out, err = capture_io do
55
+ out, _err = capture_io do
57
56
  @command.run("Foo::Bar#")
58
57
  end
59
58
  refute_equal out.uncolor, out, "should be colored"
60
59
  end
61
60
 
62
61
  it "should output uncolored information when asked" do
63
- out, err = capture_io do
62
+ out, _err = capture_io do
64
63
  @command.run("Foo::Bar#", "--no-color")
65
64
  end
66
65
  assert_equal out.uncolor, out, "should not be colored"