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
Jared Beck a107146ded Allow incompatible versions of ActiveRecord
For advanced users only. A warning is produced. See discussion
in paper_trail/compatibility.rb
2019-07-29 11:59:03 -04: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("6.1.0")
expect {
described_class.check_activerecord(ar_version)
}.to output(/not compatible/).to_stderr
end
end
end
end
end