Sha256: 3789fcd0be0b32744229dd91088316f57def4e9d232a65b8044276adeb31932d

Contents?: true

Size: 795 Bytes

Versions: 7

Compression:

Stored size: 795 Bytes

Contents

require "rails_helper"

describe PaperTrail, type: :module, versioning: true do
  describe "#config" do
    it { is_expected.to respond_to(:config) }

    it "should allow for config values to be set" do
      expect(subject.config.enabled).to eq(true)
      subject.config.enabled = false
      expect(subject.config.enabled).to eq(false)
    end

    it "should accept blocks and yield the config instance" do
      expect(subject.config.enabled).to eq(true)
      subject.config { |c| c.enabled = false }
      expect(subject.config.enabled).to eq(false)
    end
  end

  describe "#configure" do
    it { is_expected.to respond_to(:configure) }

    it "should be an alias for the `config` method" do
      expect(subject.method(:configure)).to eq(subject.method(:config))
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/paper_trail-5.2.3/spec/modules/paper_trail_spec.rb
paper_trail-6.0.2 spec/modules/paper_trail_spec.rb
paper_trail-6.0.1 spec/modules/paper_trail_spec.rb
paper_trail-6.0.0 spec/modules/paper_trail_spec.rb
paper_trail-5.2.3 spec/modules/paper_trail_spec.rb
paper_trail-5.2.2 spec/modules/paper_trail_spec.rb
paper_trail-5.2.1 spec/modules/paper_trail_spec.rb