aboutsummaryrefslogtreecommitdiffhomepage
path: root/spec/pronto
diff options
context:
space:
mode:
authorMindaugas Mozūras <mindaugas.mozuras@gmail.com>2016-02-28 17:50:43 +0200
committerMindaugas Mozūras <mindaugas.mozuras@gmail.com>2016-02-28 17:50:43 +0200
commit9be00a3292ddbbf280ac6d92b5b8add7f8ae9508 (patch)
tree620ee245557b1c434a3270fc969e2f013c40cea2 /spec/pronto
parentce89f9ed8a80a06d26b0618658733956d0c98f84 (diff)
downloadpronto-hlint-9be00a3292ddbbf280ac6d92b5b8add7f8ae9508.tar.gz
pronto-hlint-9be00a3292ddbbf280ac6d92b5b8add7f8ae9508.tar.zst
pronto-hlint-9be00a3292ddbbf280ac6d92b5b8add7f8ae9508.zip
Implement ESLint runner
Diffstat (limited to 'spec/pronto')
-rw-r--r--spec/pronto/eslint_spec.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/pronto/eslint_spec.rb b/spec/pronto/eslint_spec.rb
new file mode 100644
index 0000000..8bd0bc8
--- /dev/null
+++ b/spec/pronto/eslint_spec.rb
@@ -0,0 +1,30 @@
1require 'spec_helper'
2
3module Pronto
4 describe ESLint do
5 let(:eslint) { ESLint.new }
6
7 describe '#run' do
8 subject { eslint.run(patches, nil) }
9
10 context 'patches are nil' do
11 let(:patches) { nil }
12 it { should == [] }
13 end
14
15 context 'no patches' do
16 let(:patches) { [] }
17 it { should == [] }
18 end
19
20 context 'patches with a four warnings' do
21 include_context 'test repo'
22
23 let(:patches) { repo.diff('master') }
24
25 its(:count) { should == 4 }
26 its(:'first.msg') { should == "Expected { after 'if' condition." }
27 end
28 end
29 end
30end