Sha256: 9acfefb396134d551e7c798e4db4dad2f3378296a105189d84ed74d0467740b3

Contents?: true

Size: 808 Bytes

Versions: 18

Compression:

Stored size: 808 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
          runner.instance_variable_get('@reviews').map(&:class).should 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

18 entries across 18 versions & 1 rubygems

Version Path
rails_best_practices-1.14.4 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.14.3 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.14.2 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.14.1 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.14.0 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.13.8 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.13.5 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.13.4 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.13.3 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.13.2 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.13.1 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.13.0 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.12.0 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.11.1 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.11.0 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.10.1 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.10.0 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.9.1 spec/rails_best_practices/core/runner_spec.rb