brew/Library/Homebrew/test/checksum_spec.rb
Issy Long cb2a09e65e
Fix (auto-correct) more RSpec/BeNil offenses
- The `RSpec/BeEq` auto-corrections made more `RSpec/BeNil` offenses, so another go of `brew style --only=RSpec/BeNil --fix\` is needed.
2022-03-01 00:36:37 +00:00

24 lines
520 B
Ruby

# typed: false
# frozen_string_literal: true
require "checksum"
describe Checksum do
describe "#empty?" do
subject { described_class.new("") }
it { is_expected.to be_empty }
end
describe "#==" do
subject { described_class.new(TEST_SHA256) }
let(:other) { described_class.new(TEST_SHA256) }
let(:other_reversed) { described_class.new(TEST_SHA256.reverse) }
it { is_expected.to eq(other) }
it { is_expected.not_to eq(other_reversed) }
it { is_expected.not_to be_nil }
end
end