1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00
paper-trail-gem--paper_trail/spec/paper_trail/compatibility_spec.rb
2021-04-21 13:13:12 -05:00

25 lines
686 B
Ruby

# frozen_string_literal: true
module PaperTrail
::RSpec.describe(Compatibility) do
describe ".check_activerecord" do
context "when compatible" do
it "does not produce output" do
ar_version = ::Gem::Version.new("6.0.0")
expect {
described_class.check_activerecord(ar_version)
}.not_to output.to_stderr
end
end
context "when incompatible" do
it "writes a warning to stderr" do
ar_version = ::Gem::Version.new("7.0.0")
expect {
described_class.check_activerecord(ar_version)
}.to output(/not compatible/).to_stderr
end
end
end
end
end