Skip to content

Commit

Permalink
Silence CI warnings for missing assertions.
Browse files Browse the repository at this point in the history
Include `mutex_m` for test with RubyMine.
  • Loading branch information
donv committed Dec 30, 2024
1 parent b0f7141 commit 245da7e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
12 changes: 7 additions & 5 deletions gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
gem "oily_png", platform: :ruby, git: "https://github.com/wvanbergen/oily_png", ref: "44042006e79efd42ce4b52c1d78a4c70f0b4b1b2"
gem "ruby-vips", require: false

# Test
gem "minitest", require: false
gem "minitest-stub-const", require: false
gem "simplecov", require: false
gem "rspec", require: false
group :test do
gem 'mutex_m' # Needed for RubyMine
gem "minitest", require: false
gem "minitest-stub-const", require: false
gem "simplecov", require: false
gem "rspec", require: false
end

# Capybara Server
gem "puma", require: false
Expand Down
2 changes: 1 addition & 1 deletion test/capybara/screenshot/diff/image_compare_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ImageCompareTest < ActionDispatch::IntegrationTest
end

test "could pass use tolerance for chunky_png driver" do
ImageCompare.new("images/b.png", "images/b.base.png", driver: :chunky_png, tolerance: 0.02)
assert ImageCompare.new("images/b.png", "images/b.base.png", driver: :chunky_png, tolerance: 0.02)
end

test "it can be instantiated with dimensions" do
Expand Down
6 changes: 3 additions & 3 deletions test/capybara/screenshot/diff/screenshoter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ScreenshoterTest < ActionDispatch::IntegrationTest
end
end

mock.verify
assert mock.verify
end

test "#take_screenshot with custom screenshot options" do
Expand All @@ -39,13 +39,13 @@ class ScreenshoterTest < ActionDispatch::IntegrationTest
end
end

mock.verify
assert mock.verify
end

test "#prepare_page_for_screenshot without wait does not raise any error" do
screenshoter = Screenshoter.new({wait: nil}, ::Minitest::Mock.new)

screenshoter.prepare_page_for_screenshot(timeout: nil) # does not raise an error
assert_nil screenshoter.prepare_page_for_screenshot(timeout: nil) # does not raise an error
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/capybara/screenshot/diff/stable_screenshoter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class StableScreenshoterTest < ActionDispatch::IntegrationTest
take_stable_screenshot_with(snap)
end

mock.verify
assert mock.verify
end

test "#take_stable_screenshot without wait raises any error" do
Expand Down
4 changes: 2 additions & 2 deletions test/capybara/screenshot/diff/test_methods_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_assert_image_not_changed_with_shift_distance_limit

def test_screenshot_support_drivers_options
skip "vips is disabled" unless defined?(Capybara::Screenshot::Diff::Drivers::VipsDriverTest)
screenshot("a", driver: :vips)
assert_not screenshot("a", driver: :vips)
end

def test_skip_stack_frames
Expand All @@ -76,7 +76,7 @@ def test_skip_stack_frames
end

def test_skip_area_and_stability_time_limit
screenshot(:a, skip_area: [0, 0, 1, 1], stability_time_limit: 0.01)
assert_not screenshot(:a, skip_area: [0, 0, 1, 1], stability_time_limit: 0.01)
end

def test_creates_new_screenshot
Expand Down
1 change: 1 addition & 0 deletions test/capybara/screenshot/diff_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def _test_sample_screenshot_error
@test_screenshots = []
@test_screenshots << [["my_test.rb:42"], "sample_screenshot", mock]
mock.expect(:clear_screenshots, @test_screenshots)
assert true
end
end

Expand Down

0 comments on commit 245da7e

Please sign in to comment.