Sha256: 56e340ef0326217bd3a8b27b5201d4981a03e07fab2c8017f202a6b456e83341
Contents?: true
Size: 861 Bytes
Versions: 12
Compression:
Stored size: 861 Bytes
Contents
require "rails_helper" module PaperTrail RSpec.describe Config do describe ".instance" do it "returns the singleton instance" do expect { described_class.instance }.to_not raise_error end end describe ".new" do it "raises NoMethodError" do expect { described_class.new }.to raise_error(NoMethodError) end end describe "track_associations?" do context "@track_associations is nil" do after do PaperTrail.config.track_associations = true end it "returns false and prints a deprecation warning" do config = described_class.instance config.track_associations = nil expect { expect(config.track_associations?).to eq(false) }.to output(/DEPRECATION WARNING/).to_stderr end end end end end
Version data entries
12 entries across 12 versions & 2 rubygems