File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
spec/lib/rex/image_source Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 5
5
6
6
describe Rex ::ImageSource ::Memory do
7
7
8
- let ( :raw_data ) { " ABCDEFGHIJKLMNOP" }
8
+ let ( :raw_data ) { ' ABCDEFGHIJKLMNOP' }
9
9
10
10
subject do
11
11
described_class . new ( raw_data )
34
34
end
35
35
36
36
describe "#read" do
37
+ context "when offset and len inside range" do
38
+ let ( :offset ) { 1 }
39
+ let ( :len ) { 10 }
37
40
41
+ it "returns an String" do
42
+ expect ( subject . read ( offset , len ) ) . to be_a_kind_of ( String )
43
+ end
44
+
45
+ it "returns an String of provided length" do
46
+ expect ( subject . read ( offset , len ) . length ) . to eq ( 10 )
47
+ end
48
+
49
+ it "returns an String with contents starting at provided offset" do
50
+ expect ( subject . read ( offset , len ) ) . to start_with ( 'BCD' )
51
+ end
52
+ end
38
53
end
39
54
40
55
describe "#subsource" do
You can’t perform that action at this time.
0 commit comments