Sha256: d0dfab014b60de6bb3813df8d663140cc7d1f1fe0c36c7c276f331eebd8b4a5e

Contents?: true

Size: 839 Bytes

Versions: 13

Compression:

Stored size: 839 Bytes

Contents

require 'spec_helper'

describe RailsBestPractices::Core::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 = RailsBestPractices::Core::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 { RailsBestPractices::Core::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 { RailsBestPractices::Core::Runner.base_path = 'spec/fixtures' }
      it_should_behave_like 'load_plugin_reviews'
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
rails_best_practices-gorgeouscode-1.0.0 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.9.0 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.8.0 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.7.2 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.7.1 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.7.0 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.6.0 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.5.3 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.5.2 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.5.1 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.5.0 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.4.0 spec/rails_best_practices/core/runner_spec.rb
rails_best_practices-1.3.0 spec/rails_best_practices/core/runner_spec.rb