Sha256: 8325a398d0671168c4ac37b65af9a08d631b343df3142b872e314b9eb57b20d9

Contents?: true

Size: 843 Bytes

Versions: 5

Compression:

Stored size: 843 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

module RailsBestPractices::Core
  describe Runner do
    describe 'load_plugin_reviews' do
      shared_examples_for 'load_plugin_reviews' do
        it 'should load plugins in lib/rails_best_practices/plugins/reviews' do
          runner = Runner.new
          expect(runner.instance_variable_get('@reviews').map(&:class)).to include(RailsBestPractices::Plugins::Reviews::NotUseRailsRootReview)
        end
      end

      context 'given a path that ends with a slash' do
        before { Runner.base_path = 'spec/fixtures/' }
        it_should_behave_like 'load_plugin_reviews'
      end

      context 'given a path that does not end with a slash' do
        before { Runner.base_path = 'spec/fixtures' }
        it_should_behave_like 'load_plugin_reviews'
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails_best_practices-1.20.0 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.19.5 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.19.4 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.19.3 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.19.2 spec/rails_best_practices/core/runner_spec.rb