Skip to content

Commit 500e1ad

Browse files
committed
Use !empty? instead of length > 0.
Addressing rubocop warning.
1 parent 3bda005 commit 500e1ad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/ds/arf_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def test_create_arf_and_get_profile
6060
def test_new_memory
6161
create_arf
6262
raw_data = File.read(REPORT)
63-
assert raw_data.length > 0
63+
refute raw_data.empty?
6464
arf = OpenSCAP::DS::Arf.new :content => raw_data, :path => REPORT
6565
arf.destroy
6666
end

test/source_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_source_new_ok
3232

3333
def test_source_new_memory
3434
raw_data = File.read('../data/xccdf.xml')
35-
assert raw_data.length > 0
35+
refute raw_data.empty?
3636
s = OpenSCAP::Source.new(:content => raw_data, :path => '/mytestpath')
3737
s.destroy
3838
end

0 commit comments

Comments
 (0)