diff --git a/spec/driver_spec.rb b/spec/driver_spec.rb index 67cb7dce..854726d8 100644 --- a/spec/driver_spec.rb +++ b/spec/driver_spec.rb @@ -1500,4 +1500,19 @@ def which_for(character) it_behaves_like "a keyupdown app" end + + context "null byte app" do + before(:all) do + @app = lambda do |env| + body = "Hello\0World" + [200, + { 'Content-Type' => 'text/html', 'Content-Length' => body.length.to_s }, + [body]] + end + end + + it "should include all the bytes in the source" do + subject.source.should == "Hello\0World" + end + end end