spec/spec_common.rb in bindata-1.4.5 vs spec/spec_common.rb in bindata-1.5.0

- old
+ new

@@ -47,5 +47,12 @@ exception_line(err).should == line block.call(err) if block_given? end end +def binary(str) + if str.respond_to?(:force_encoding) + str.dup.force_encoding(Encoding::BINARY) + else + str + end +end