conpar 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/conpar/version.rb +1 -1
- data/spec/lib/document_spec.rb +26 -26
- data/spec/spec_helper.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bec092af085d6bd38b053e2b4540a9ec7a9883c
|
4
|
+
data.tar.gz: 3c45e73e387eec8f8db4e46a8266ee53924b0ad8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fca44345a3347831ebc4e2c8d1ed4f8ee42776807b5bc248786760a9867e39aa3088d42088d25375c6d236e4d4aae0cafe2d2bc7d238a1d24710744879d9539
|
7
|
+
data.tar.gz: 59153b039554c07613944b2f0f0b45afa4c8d9b08608511b10d214ed7ca5ddfd9933f9cd7d996d0ffa366de55e5a60e499e67fa873cf15ec790ffeba6e769942
|
data/lib/conpar/version.rb
CHANGED
data/spec/lib/document_spec.rb
CHANGED
@@ -39,12 +39,12 @@ describe Conpar::Document do
|
|
39
39
|
|
40
40
|
context "result" do
|
41
41
|
let(:result) { subject.parse(config) }
|
42
|
-
it { expect(result.select{|r| r.ilk == :comment }).to
|
42
|
+
it { expect(result.select{|r| r.ilk == :comment }.size).to eq(2) }
|
43
43
|
context "ACLs" do
|
44
44
|
let(:acls) do
|
45
45
|
result.select{|r| r.ilk == :access_list }
|
46
46
|
end
|
47
|
-
it { expect(acls).to
|
47
|
+
it { expect(acls.size).to eq(1) }
|
48
48
|
it "first acl should be on line #3" do
|
49
49
|
expect(acls.first.line_number).to eq("3")
|
50
50
|
end
|
@@ -71,10 +71,10 @@ describe Conpar::Document do
|
|
71
71
|
|
72
72
|
context "result" do
|
73
73
|
let(:result) { subject.parse(config) }
|
74
|
-
it { expect(result.select{|r| r.ilk == :comment }).to
|
75
|
-
it { expect(result.select{|r| r.ilk == :access_list }).to
|
76
|
-
it { expect(result.select{|r| r.sub_ilk == "standard" }).to
|
77
|
-
it { expect(result.select{|r| r.sub_ilk == "extended" }).to
|
74
|
+
it { expect(result.select{|r| r.ilk == :comment }.size).to eq(2) }
|
75
|
+
it { expect(result.select{|r| r.ilk == :access_list }.size).to eq(2) }
|
76
|
+
it { expect(result.select{|r| r.sub_ilk == "standard" }.size).to eq(1) }
|
77
|
+
it { expect(result.select{|r| r.sub_ilk == "extended" }.size).to eq(1) }
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
@@ -84,11 +84,11 @@ describe Conpar::Document do
|
|
84
84
|
|
85
85
|
context "result" do
|
86
86
|
let(:result) { subject.parse(config) }
|
87
|
-
it { expect(result.select{|r| r.ilk == :comment }).to
|
88
|
-
it { expect(result.select{|r| r.ilk == :access_list }).to
|
89
|
-
it { expect(result.select{|r| r.sub_ilk == "standard" }).to
|
90
|
-
it { expect(result.select{|r| r.sub_ilk == "extended" }).to
|
91
|
-
it { expect(result.select{|r| r.sub_ilk == "unknown" }).to
|
87
|
+
it { expect(result.select{|r| r.ilk == :comment }.size).to eq(2) }
|
88
|
+
it { expect(result.select{|r| r.ilk == :access_list }.size).to eq(3) }
|
89
|
+
it { expect(result.select{|r| r.sub_ilk == "standard" }.size).to eq(1) }
|
90
|
+
it { expect(result.select{|r| r.sub_ilk == "extended" }.size).to eq(1) }
|
91
|
+
it { expect(result.select{|r| r.sub_ilk == "unknown" }.size).to eq(1) }
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
@@ -98,12 +98,12 @@ describe Conpar::Document do
|
|
98
98
|
|
99
99
|
context "result" do
|
100
100
|
let(:result) { subject.parse(config) }
|
101
|
-
it { expect(result.select{|r| r.ilk == :comment }).to
|
102
|
-
it { expect(result.select{|r| r.ilk == :access_list }).to
|
103
|
-
it { expect(result.select{|r| r.sub_ilk == "standard" }).to
|
104
|
-
it { expect(result.select{|r| r.sub_ilk == "extended" }).to
|
105
|
-
it { expect(result.select{|r| r.sub_ilk == "unknown" }).to
|
106
|
-
it { expect(result.select{|r| r.ilk == :directive }).to
|
101
|
+
it { expect(result.select{|r| r.ilk == :comment }.size).to eq(3) }
|
102
|
+
it { expect(result.select{|r| r.ilk == :access_list }.size).to eq(3) }
|
103
|
+
it { expect(result.select{|r| r.sub_ilk == "standard" }.size).to eq(1) }
|
104
|
+
it { expect(result.select{|r| r.sub_ilk == "extended" }.size).to eq(1) }
|
105
|
+
it { expect(result.select{|r| r.sub_ilk == "unknown" }.size).to eq(1) }
|
106
|
+
it { expect(result.select{|r| r.ilk == :directive }.size).to eq(2) }
|
107
107
|
end
|
108
108
|
end
|
109
109
|
|
@@ -113,12 +113,12 @@ describe Conpar::Document do
|
|
113
113
|
|
114
114
|
context "result" do
|
115
115
|
let(:result) { subject.parse(config) }
|
116
|
-
it { expect(result.select{|r| r.ilk == :comment }).to
|
117
|
-
it { expect(result.select{|r| r.ilk == :access_list }).to
|
118
|
-
it { expect(result.select{|r| r.sub_ilk == "standard" }).to
|
119
|
-
it { expect(result.select{|r| r.sub_ilk == "extended" }).to
|
120
|
-
it { expect(result.select{|r| r.sub_ilk == "unknown" }).to
|
121
|
-
it { expect(result.select{|r| r.ilk == :directive }).to
|
116
|
+
it { expect(result.select{|r| r.ilk == :comment }.size).to eq(4) }
|
117
|
+
it { expect(result.select{|r| r.ilk == :access_list }.size).to eq(4) }
|
118
|
+
it { expect(result.select{|r| r.sub_ilk == "standard" }.size).to eq(1) }
|
119
|
+
it { expect(result.select{|r| r.sub_ilk == "extended" }.size).to eq(2) }
|
120
|
+
it { expect(result.select{|r| r.sub_ilk == "unknown" }.size).to eq(1) }
|
121
|
+
it { expect(result.select{|r| r.ilk == :directive }.size).to eq(2) }
|
122
122
|
end
|
123
123
|
end
|
124
124
|
|
@@ -129,9 +129,9 @@ describe Conpar::Document do
|
|
129
129
|
|
130
130
|
context "result" do
|
131
131
|
let(:result) { subject.parse(config) }
|
132
|
-
it { expect(result.select{|r| r.ilk == :comment }).to
|
133
|
-
it { expect(result.select{|r| r.ilk == :access_list }).to
|
134
|
-
it { expect(result.select{|r| r.sub_ilk == "extended" }).to
|
132
|
+
it { expect(result.select{|r| r.ilk == :comment }.size).to eq(2) }
|
133
|
+
it { expect(result.select{|r| r.ilk == :access_list }.size).to eq(1) }
|
134
|
+
it { expect(result.select{|r| r.sub_ilk == "extended" }.size).to eq(1) }
|
135
135
|
end
|
136
136
|
end#legacy-sample1
|
137
137
|
end
|
data/spec/spec_helper.rb
CHANGED