Sha256: 9705e02f3ab7a9a4c6adc609454f8d419a70b5c25d5c9d20bfabd927bab99194

Contents?: true

Size: 812 Bytes

Versions: 1

Compression:

Stored size: 812 Bytes

Contents

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

1 entries across 1 versions & 1 rubygems

Version Path
rails_best_practices-1.19.1 spec/rails_best_practices/core/runner_spec.rb