spec/binary/hexdump/parser_spec.rb in ronin-support-0.5.1 vs spec/binary/hexdump/parser_spec.rb in ronin-support-0.5.2

- old
+ new

@@ -16,11 +16,11 @@ end let(:hexdump) { load_hexdump('hexdump_octal_bytes') } it "should unhexdump octal-byte hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end context " hex bytes" do subject do @@ -28,11 +28,11 @@ end let(:hexdump) { load_hexdump('hexdump_hex_bytes') } it "should unhexdump hex-byte hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end context "decimal shorts" do subject do @@ -40,11 +40,11 @@ end let(:hexdump) { load_hexdump('hexdump_decimal_shorts') } it "should unhexdump decimal-short hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end context "octal shorts" do subject do @@ -52,11 +52,11 @@ end let(:hexdump) { load_hexdump('hexdump_octal_shorts') } it "should unhexdump octal-short hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end context "hex shorts" do subject do @@ -64,11 +64,11 @@ end let(:hexdump) { load_hexdump('hexdump_hex_shorts') } it "should unhexdump hex-short hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end context "repeated" do subject do @@ -76,11 +76,11 @@ end let(:hexdump) { load_hexdump('hexdump_repeated') } it "should unhexdump repeated hexdump output" do - subject.parse(hexdump).should == repeated + expect(subject.parse(hexdump)).to eq(repeated) end end end context "od" do @@ -93,11 +93,11 @@ end let(:hexdump) { load_hexdump('od_octal_bytes') } it "should unhexdump octal-byte hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end context "octal shorts" do subject do @@ -105,11 +105,11 @@ end let(:hexdump) { load_hexdump('od_octal_shorts') } it "should unhexdump octal-shorts hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end context "octal ints" do subject do @@ -117,11 +117,11 @@ end let(:hexdump) { load_hexdump('od_octal_ints') } it "should unhexdump octal-ints hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end if RUBY_VERSION > '1.9.' context "octal quads" do @@ -130,11 +130,11 @@ end let(:hexdump) { load_hexdump('od_octal_quads') } it "should unhexdump octal-quads hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end end context "decimal bytes" do @@ -143,11 +143,11 @@ end let(:hexdump) { load_hexdump('od_decimal_bytes') } it "should unhexdump decimal-byte hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end context "decimal shorts" do subject do @@ -155,11 +155,11 @@ end let(:hexdump) { load_hexdump('od_decimal_shorts') } it "should unhexdump decimal-shorts hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end context "decimal ints" do subject do @@ -167,11 +167,11 @@ end let(:hexdump) { load_hexdump('od_decimal_ints') } it "should unhexdump decimal-ints hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end if RUBY_VERSION > '1.9.' context "decimal quads" do @@ -180,11 +180,11 @@ end let(:hexdump) { load_hexdump('od_decimal_quads') } it "should unhexdump decimal-quads hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end end context "named chars" do @@ -195,11 +195,11 @@ let(:mask) { ~(1 << 7) } let(:data) { ascii.bytes.map { |b| (b & mask).chr }.join } let(:hexdump) { load_hexdump('od_named_chars') } it "should unhexdump named characters" do - subject.parse(hexdump).should == data + expect(subject.parse(hexdump)).to eq(data) end end context "hex bytes" do subject do @@ -207,11 +207,11 @@ end let(:hexdump) { load_hexdump('od_hex_bytes') } it "should unhexdump hex-byte hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end context "hex shorts" do subject do @@ -219,11 +219,11 @@ end let(:hexdump) { load_hexdump('od_hex_shorts') } it "should unhexdump hex-shorts hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end context "hex ints" do subject do @@ -231,11 +231,11 @@ end let(:hexdump) { load_hexdump('od_hex_ints') } it "should unhexdump hex-ints hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end if RUBY_VERSION > '1.9.' context "hex quads" do @@ -244,11 +244,11 @@ end let(:hexdump) { load_hexdump('od_hex_quads') } it "should unhexdump hex-quads hexdump output" do - subject.parse(hexdump).should == ascii + expect(subject.parse(hexdump)).to eq(ascii) end end end context "floats" do @@ -263,11 +263,11 @@ end let(:hexdump) { load_hexdump('od_floats') } it "should unhexdump floats" do - subject.parse(hexdump).should == data + expect(subject.parse(hexdump)).to eq(data) end end context "doubles" do subject do @@ -281,11 +281,11 @@ end let(:hexdump) { load_hexdump('od_doubles') } it "should unhexdump doubles" do - subject.parse(hexdump).should == data + expect(subject.parse(hexdump)).to eq(data) end end context "repeated" do subject do @@ -293,10 +293,10 @@ end let(:hexdump) { load_hexdump('od_repeated') } it "should unhexdump repeated hexdump output" do - subject.parse(hexdump).should == repeated + expect(subject.parse(hexdump)).to eq(repeated) end end end end