blob: 7af0aa25f20030a5ed97e7e0da8812f74bfd208b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
require 'spec_helper'
module Pronto
describe ESLint do
let(:eslint) { ESLint.new(patches) }
describe '#run' do
subject { eslint.run }
context 'patches are nil' do
let(:patches) { nil }
it { should == [] }
end
context 'no patches' do
let(:patches) { [] }
it { should == [] }
end
context 'patches with a four and a five warnings' do
include_context 'test repo'
let(:patches) { repo.diff('master') }
its(:count) { should == 9 }
its(:'first.msg') { should == "Expected { after 'if' condition." }
end
end
end
end
|