spec/present_with_spec.rb in grape-roar-0.4.0 vs spec/present_with_spec.rb in grape-roar-0.4.1
- old
+ new
@@ -1,19 +1,10 @@
-require 'spec_helper'
+# frozen_string_literal: true
-describe Grape::Roar do
- subject do
- Class.new(Grape::API)
- end
- before do
- subject.format :json
- subject.formatter :json, Grape::Formatter::Roar
- end
- def app
- subject
- end
+describe Grape::Roar do
+ include_context 'Grape API App'
context 'using present' do
before do
subject.get('/product/:id') do
present Product.new(title: 'Lonestar', id: params[:id]), with: ProductRepresenter