inch 0.6.2 → 0.6.3

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.
@@ -0,0 +1,27 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../../test_helper')
2
+
3
+ describe ::Inch::Language::Elixir::CodeObject::FunctionObject do
4
+ before do
5
+ @codebase = fresh_codebase(:elixir, :inch_test, 'all.json')
6
+ @objects = @codebase.objects
7
+ end
8
+
9
+ describe 'Scores' do
10
+ #
11
+ it 'should not' do
12
+ m = @objects.find('InchTest.Callbacks.full_doc/1')
13
+ assert m.score >= 50
14
+ end
15
+ #
16
+ it 'should recognize @doc false' do
17
+ m = @objects.find('InchTest.Callbacks.no_doc/1')
18
+ assert m.nodoc?
19
+ end
20
+ #
21
+ it 'should not' do
22
+ m = @objects.find('InchTest.Callbacks.missing_doc/1')
23
+ assert m.score == 0
24
+ assert m.undocumented?
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,27 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../../test_helper')
2
+
3
+ describe ::Inch::Language::Elixir::CodeObject::FunctionObject do
4
+ before do
5
+ @codebase = fresh_codebase(:elixir, :inch_test, 'all.json')
6
+ @objects = @codebase.objects
7
+ end
8
+
9
+ describe 'Scores' do
10
+ #
11
+ it 'should not' do
12
+ m = @objects.find('InchTest.Macros.full_doc/0')
13
+ assert m.score >= 50
14
+ end
15
+ #
16
+ it 'should recognize @doc false' do
17
+ m = @objects.find('InchTest.Macros.no_doc/0')
18
+ assert m.nodoc?
19
+ end
20
+ #
21
+ it 'should not' do
22
+ m = @objects.find('InchTest.Macros.missing_doc/0')
23
+ assert m.score == 0
24
+ assert m.undocumented?
25
+ end
26
+ end
27
+ end
@@ -46,11 +46,6 @@ describe ::Inch::Language::Elixir::CodeObject::ModuleObject do
46
46
  file = m.filename
47
47
  refute_nil file
48
48
  assert_equal 'lib/inch_test/functions.ex', file.relative_path
49
- assert_equal 9, file.line_no.to_i
50
- end
51
-
52
- it 'should recognize missing code location' do
53
- m = @objects.find('InchTest.FunctionObject')
54
- assert_nil m.filename
49
+ assert_equal 1, file.line_no.to_i
55
50
  end
56
51
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - René Föhring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-13 00:00:00.000000000 Z
11
+ date: 2015-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -369,7 +369,9 @@ files:
369
369
  - test/unit/config/codebase_test.rb
370
370
  - test/unit/config_test.rb
371
371
  - test/unit/evaluation/role_test.rb
372
+ - test/unit/language/elixir/code_object/callback_object_test.rb
372
373
  - test/unit/language/elixir/code_object/function_object_test.rb
374
+ - test/unit/language/elixir/code_object/macro_object_test.rb
373
375
  - test/unit/language/elixir/code_object/module_object_test.rb
374
376
  - test/unit/language/javascript/code_object/function_object_test.rb
375
377
  - test/unit/language/javascript/provider/jsdoc/docstring_test.rb
@@ -403,7 +405,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
403
405
  version: '0'
404
406
  requirements: []
405
407
  rubyforge_project:
406
- rubygems_version: 2.2.2
408
+ rubygems_version: 2.4.7
407
409
  signing_key:
408
410
  specification_version: 4
409
411
  summary: Documentation measurement tool for Ruby
@@ -467,7 +469,9 @@ test_files:
467
469
  - test/unit/config/codebase_test.rb
468
470
  - test/unit/config_test.rb
469
471
  - test/unit/evaluation/role_test.rb
472
+ - test/unit/language/elixir/code_object/callback_object_test.rb
470
473
  - test/unit/language/elixir/code_object/function_object_test.rb
474
+ - test/unit/language/elixir/code_object/macro_object_test.rb
471
475
  - test/unit/language/elixir/code_object/module_object_test.rb
472
476
  - test/unit/language/javascript/code_object/function_object_test.rb
473
477
  - test/unit/language/javascript/provider/jsdoc/docstring_test.rb