Sha256: 31bbbb0c4445c9b2ea6f80b002fdab1bbcd0e7c822b2025fc31a5c7497cf100c

Contents?: true

Size: 1.08 KB

Versions: 7

Compression:

Stored size: 1.08 KB

Contents

require 'rails_helper'

describe RepoAnalyzer::CircleciExtractor, repo_analyzer_extractor_helpers: true do
  describe "#extract" do
    let(:expected) do
      {
        "code_coverage" => true,
        "jest" => true,
        "rspec" => true,
        "system_tests" => true,
        "eslint" => true,
        "rubocop" => true,
        "stylelint" => true,
        "platanus_compose" => false
      }
    end

    before do
      mock_file_content(".circleci/config.yml", "valid_circleci_config.yml")
    end

    it { expect(extract).to eq(circleci_extractor: expected) }

    context "with old config" do
      let(:expected) do
        {
          "code_coverage" => false,
          "jest" => true,
          "rspec" => true,
          "system_tests" => false,
          "eslint" => false,
          "rubocop" => false,
          "stylelint" => false,
          "platanus_compose" => true
        }
      end

      before do
        mock_file_content(".circleci/config.yml", "old_circleci_config.yml")
      end

      it { expect(extract).to eq(circleci_extractor: expected) }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
repo_analyzer-1.6.0 spec/extractors/circleci_extractor_spec.rb
repo_analyzer-1.5.0 spec/extractors/circleci_extractor_spec.rb
repo_analyzer-1.4.0 spec/extractors/circleci_extractor_spec.rb
repo_analyzer-1.3.0 spec/extractors/circleci_extractor_spec.rb
repo_analyzer-1.2.0 spec/extractors/circleci_extractor_spec.rb
repo_analyzer-1.1.0 spec/extractors/circleci_extractor_spec.rb
repo_analyzer-1.0.0 spec/extractors/circleci_extractor_spec.rb