Skip to content

Commit f521cc5

Browse files
committed
Delete .encode specs, anyone uses the method, plus looks wrong
1 parent 9a74e60 commit f521cc5

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

spec/lib/rex/encoder/nonalpha_spec.rb

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
end
3434

3535
it "returns the decoder code" do
36-
p "#{described_class.gen_decoder}"
3736
is_expected.to match(decoder)
3837
end
3938
end
@@ -140,49 +139,4 @@
140139
end
141140
end
142141

143-
describe ".encode" do
144-
subject { described_class.encode(buf) }
145-
146-
context "when buf includes a badchar" do
147-
let(:buf) { "ABCDEF{" }
148-
149-
it "raises an error" do
150-
expect { subject }.to raise_error(RuntimeError)
151-
end
152-
end
153-
154-
context "when buf includes Alpha chars" do
155-
let(:buf) { "@#()" }
156-
157-
it "returns an String" do
158-
is_expected.to be_an(String)
159-
end
160-
161-
it "includes the decoder stub" do
162-
is_expected.to match(decoder)
163-
end
164-
165-
it "doesn't include the original buf" do
166-
is_expected.to_not include(buf)
167-
end
168-
end
169-
170-
context "when buf doesn't include Alpha chars" do
171-
let(:buf) { "ABCD" }
172-
173-
it "returns an String" do
174-
is_expected.to be_an(String)
175-
end
176-
177-
it "includes the decoder stub" do
178-
is_expected.to match(decoder)
179-
end
180-
181-
it "includes the original buf" do
182-
is_expected.to include(buf)
183-
end
184-
end
185-
186-
end
187-
188142
end

0 commit comments

Comments
 (0)