mirror of
https://github.com/paper-trail-gem/paper_trail.git
synced 2022-11-09 11:33:19 -05:00
* Make paper_trail work with Rails 7.0 * from class_methods do back to module ClassMethods * add spec for PostgresArraySerializer to boost coverage * lint the spec for PostgresArraySerializer * lint the spec for PostgresArraySerializer again * and now make that linted spec pass again * test object change scopes a bit * round out json and jsonb testing of object scopes * test some other code paths to increase coverage * linting * linting * mess with yaml loading in test * oddball cop for double quotes * use Rails public API for compatibility rather than instance_variable_set Co-authored-by: dfurber <dfurber@truecar.com>
25 lines
686 B
Ruby
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.1.0")
|
|
expect {
|
|
described_class.check_activerecord(ar_version)
|
|
}.to output(/not compatible/).to_stderr
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|