mirror of
https://github.com/paper-trail-gem/paper_trail.git
synced 2022-11-09 11:33:19 -05:00
Lint: Fix RSpec/FilePath
This commit is contained in:
parent
fe86d65a1f
commit
1af1d0dab0
6 changed files with 25 additions and 31 deletions
|
@ -23,9 +23,6 @@ RSpec/ExpectInHook:
|
|||
- spec/paper_trail/associations_spec.rb
|
||||
- spec/models/version_spec.rb
|
||||
|
||||
RSpec/FilePath:
|
||||
Enabled: false
|
||||
|
||||
RSpec/InstanceVariable:
|
||||
Exclude:
|
||||
- spec/paper_trail/associations_spec.rb
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require "spec_helper"
|
||||
require "generator_spec/test_case"
|
||||
require File.expand_path("../../../lib/generators/paper_trail/install_generator", __FILE__)
|
||||
require File.expand_path("../../../../lib/generators/paper_trail/install_generator", __FILE__)
|
||||
|
||||
RSpec.describe PaperTrail::InstallGenerator, type: :generator do
|
||||
include GeneratorSpec::TestCase
|
|
@ -1,27 +0,0 @@
|
|||
require "spec_helper"
|
||||
|
||||
RSpec.describe PaperTrail, type: :module, versioning: true do
|
||||
describe "#config" do
|
||||
it { is_expected.to respond_to(:config) }
|
||||
|
||||
it "allows 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 "accepts 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 "is an alias for the `config` method" do
|
||||
expect(subject.method(:configure)).to eq(subject.method(:config))
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,6 +1,30 @@
|
|||
require "spec_helper"
|
||||
|
||||
RSpec.describe PaperTrail do
|
||||
describe "#config", versioning: true do
|
||||
it { is_expected.to respond_to(:config) }
|
||||
|
||||
it "allows 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 "accepts 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 "is an alias for the `config` method" do
|
||||
expect(subject.method(:configure)).to eq(subject.method(:config))
|
||||
end
|
||||
end
|
||||
|
||||
describe ".gem_version" do
|
||||
it "returns a Gem::Version" do
|
||||
v = described_class.gem_version
|
||||
|
|
Loading…
Reference in a new issue