From d934d1035b8968fe282254be17a9c1b6fefc82d8 Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Mon, 25 Mar 2013 23:27:25 -0400 Subject: [PATCH] add test for #87 --- sinatra-contrib/spec/respond_with/baz.yajl | 1 + sinatra-contrib/spec/respond_with_spec.rb | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 sinatra-contrib/spec/respond_with/baz.yajl diff --git a/sinatra-contrib/spec/respond_with/baz.yajl b/sinatra-contrib/spec/respond_with/baz.yajl new file mode 100644 index 00000000..5d7e679e --- /dev/null +++ b/sinatra-contrib/spec/respond_with/baz.yajl @@ -0,0 +1 @@ +json = "yajl!" diff --git a/sinatra-contrib/spec/respond_with_spec.rb b/sinatra-contrib/spec/respond_with_spec.rb index d7c1492d..1a78b307 100644 --- a/sinatra-contrib/spec/respond_with_spec.rb +++ b/sinatra-contrib/spec/respond_with_spec.rb @@ -228,6 +228,12 @@ describe Sinatra::RespondWith do req(:pdf).should be_ok body.should == "hi" end + + it 'uses yajl for json' do + respond_with :baz + req(:json).should be_ok + body.should == "\"yajl!\"" + end end describe 'customizing' do