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