Sha256: ea8f280850cfdeeea811ed379d3816d5e58d53f30aaf962284ce13f81e152760

Contents?: true

Size: 873 Bytes

Versions: 4

Compression:

Stored size: 873 Bytes

Contents

# frozen_string_literal: true

require File.expand_path('spec_helper', __dir__)

module Danger
  describe Danger::DangerOrmolu do
    it 'should be a plugin' do
      expect(Danger::DangerOrmolu.new(nil)).to be_a Danger::Plugin
    end

    #
    # You should test your custom attributes and methods here
    #
    describe 'with Dangerfile' do
      before do
        @dangerfile = testing_dangerfile
        @ormolu = @dangerfile.ormolu
        allow(@ormolu.git).to receive(:added_files).and_return([])
        allow(@ormolu.git).to receive(:modified_files).and_return([])
      end

      # Some examples for writing tests
      # You should replace these with your own.

      it 'collects Warnings' do
        expect(@ormolu).to receive(:warn).exactly(4).times
        @ormolu.check([File.expand_path('spec/fixtures/HaskellTestFile.hs')])
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
danger-ormolu-0.0.4 spec/ormolu_spec.rb
danger-ormolu-0.0.3 spec/ormolu_spec.rb
danger-ormolu-0.0.2 spec/ormolu_spec.rb
danger-ormolu-0.0.1 spec/ormolu_spec.rb