Sha256: b987185b3d52f27280dc419d8fdbc37aa9ccd5381fe2edf73585be1d422e0f7d

Contents?: true

Size: 954 Bytes

Versions: 5

Compression:

Stored size: 954 Bytes

Contents

require "spec_helper"

describe StyleGuide::Config do
  describe "#partial_paths" do
    context "when no paths have been added" do
      it { should have_at_least(1).partial_path }
      its(:partial_paths) { should_not include StyleGuide::Engine.root.join("app/views/style_guide/style") }
    end

    context "when adding a path" do
      it "modifies the partial paths" do
        expect do
          subject.partial_paths << "disappointment"
        end.to change{ subject.partial_paths.count }.by(1)
      end
    end

    context "when setting the paths" do
      it "sets the partial paths" do
        expect do
          subject.partial_paths = "loathing"
        end.to change { subject.partial_paths }.to(["loathing"])
      end
    end

    context "after a path has been added" do
      before { subject.partial_paths << "partials-and-magic-beans" }

      its(:partial_paths) { should include "partials-and-magic-beans" }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
style-guide-0.6.2 spec/lib/style_guide/config_spec.rb
style-guide-0.6.1 spec/lib/style_guide/config_spec.rb
style-guide-0.6.0 spec/lib/style_guide/config_spec.rb
style-guide-0.5.0 spec/lib/style_guide/config_spec.rb
style-guide-0.4.0 spec/lib/style_guide/config_spec.rb