Sha256: 001444e97b3d352aedc66fbffc7848237e43e1a313f744902cc84e05faacb4ea

Contents?: true

Size: 707 Bytes

Versions: 5

Compression:

Stored size: 707 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

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

      context 'configs' do
        it 'should parse 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

5 entries across 5 versions & 1 rubygems

Version Path
rails_best_practices-1.20.0 spec/rails_best_practices/prepares/config_prepare_spec.rb
rails_best_practices-1.19.5 spec/rails_best_practices/prepares/config_prepare_spec.rb
rails_best_practices-1.19.4 spec/rails_best_practices/prepares/config_prepare_spec.rb
rails_best_practices-1.19.3 spec/rails_best_practices/prepares/config_prepare_spec.rb
rails_best_practices-1.19.2 spec/rails_best_practices/prepares/config_prepare_spec.rb