From 518e74f8769daf67fca461139d3c7229abdb6e60 Mon Sep 17 00:00:00 2001 From: Koza Date: Wed, 12 Apr 2023 17:32:20 +0200 Subject: Rubocop fixes --- lib/axlsx/drawing/pic.rb | 6 +----- test/drawing/tc_pic.rb | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/axlsx/drawing/pic.rb b/lib/axlsx/drawing/pic.rb index dda1763c..e31876bf 100644 --- a/lib/axlsx/drawing/pic.rb +++ b/lib/axlsx/drawing/pic.rb @@ -98,11 +98,7 @@ module Axlsx def remote=(v) Axlsx::validate_boolean(v); @remote = v; end def remote? - if remote == 1 || remote.to_s == 'true' - true - else - false - end + remote == 1 || remote.to_s == 'true' end # The file name of image_src without any path information diff --git a/test/drawing/tc_pic.rb b/test/drawing/tc_pic.rb index d38d5e9a..34f24eb3 100644 --- a/test/drawing/tc_pic.rb +++ b/test/drawing/tc_pic.rb @@ -27,7 +27,6 @@ class TestPic < Test::Unit::TestCase assert_equal(@image_remote.remote?, true) end - def test_anchor_swapping # swap from one cell to two cell when end_at is specified assert(@image.anchor.is_a?(Axlsx::OneCellAnchor)) @@ -94,7 +93,6 @@ class TestPic < Test::Unit::TestCase assert_equal(@image_remote.image_src, @test_img_remote_png) end - def test_descr assert_raise(ArgumentError) { @image.descr = 49 } assert_nothing_raised { @image.descr = "test" } -- cgit v1.2.3