Skip to content

Commit 500277e

Browse files
committed
Add SimpleCov
1 parent cc35cf3 commit 500277e

6 files changed

+10
-9
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
*.gem
33
Gemfile.lock
44
.todo
5+
coverage

test/configuration_test.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ def teardown
1010
end
1111

1212
def test_default_configuration
13-
assert_equal nil, Enumerations.configuration.primary_key
14-
assert_equal nil, Enumerations.configuration.foreign_key_suffix
13+
assert_nil Enumerations.configuration.primary_key
14+
assert_nil Enumerations.configuration.foreign_key_suffix
1515
end
1616

1717
def test_custom_configuration

test/finder_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_find_by
2828
def test_fail_find_by
2929
status = Status.find_by(name: 'Draft1')
3030

31-
assert_equal nil, status
31+
assert_nil status
3232
end
3333

3434
def test_where_by_name

test/helpers/test_helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
require 'codeclimate-test-reporter'
2-
CodeClimate::TestReporter.start
1+
require 'simplecov'
2+
SimpleCov.start
33

44
require 'minitest/autorun'
55
require 'enumerations'

test/translation_test.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ def test_translated_custom_attribute_with_custom_locale
6969
def test_empty_custom_attribute_with_custom_locale
7070
role = Role.find(:admin)
7171

72-
assert_equal nil, role.description(locale: :hr)
72+
assert_nil role.description(locale: :hr)
7373
end
7474

7575
def test_empty_custom_attribute_with_custom_locale_and_defined_translation
7676
role = Role.find(:author)
7777

78-
assert_equal nil, role.description(locale: :hr)
78+
assert_nil role.description(locale: :hr)
7979
end
8080

8181
def test_find_by_localized_name
@@ -89,6 +89,6 @@ def test_find_by_localized_name_with_i18n_locale
8989
status = Status.find_by(name: 'Nacrt')
9090
I18n.locale = :en
9191

92-
assert_equal nil, status
92+
assert_nil status
9393
end
9494
end

test/value_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_with_defined_custom_attributes_deleted
4040
def test_without_defined_custom_attributes
4141
status = Status.find(:draft)
4242

43-
assert_equal nil, status.visible
43+
assert_nil status.visible
4444
end
4545

4646
def test_enumeration_to_i_return_ordinal

0 commit comments

Comments
 (0)