Sha256: b4c3ea10ad1e542885f0d15f3e1cdfdb7aeab789ad6c380e4a39c260bac5987e

Contents?: true

Size: 703 Bytes

Versions: 7

Compression:

Stored size: 703 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

module RailsBestPractices
  module Prepares
    describe ConfigPrepare do
      let(:runner) { Core::Runner.new(prepares: described_class.new) }

      context 'configs' do
        it 'parses configs' do
          content = <<-EOF
          module RailsBestPracticesCom
            class Application < Rails::Application
              config.active_record.whitelist_attributes = true
            end
          end
          EOF
          runner.prepare('config/application.rb', content)
          configs = Prepares.configs
          expect(configs['config.active_record.whitelist_attributes']).to eq('true')
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rails_best_practices-1.23.2 spec/rails_best_practices/prepares/config_prepare_spec.rb
rails_best_practices-1.23.1 spec/rails_best_practices/prepares/config_prepare_spec.rb
rails_best_practices-1.23.0 spec/rails_best_practices/prepares/config_prepare_spec.rb
rails_best_practices-1.22.1 spec/rails_best_practices/prepares/config_prepare_spec.rb
rails_best_practices-1.22.0 spec/rails_best_practices/prepares/config_prepare_spec.rb
rails_best_practices-1.21.0 spec/rails_best_practices/prepares/config_prepare_spec.rb
rails_best_practices-1.20.1 spec/rails_best_practices/prepares/config_prepare_spec.rb