Skip to content

Commit f182aa9

Browse files
author
Michael Bleigh
committed
Try to fix specs for multiple rubies.
1 parent 57954a7 commit f182aa9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spec/grape/api_spec.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@ def app; subject end
107107
end
108108

109109
it 'should add the association to the :representations setting' do
110-
subject.represent Object, :with => BasicObject
111-
subject.settings[:representations][Object].should == BasicObject
110+
klass = Class.new
111+
subject.represent Object, :with => klass
112+
subject.settings[:representations][Object].should == klass
112113
end
113114
end
114115

@@ -597,7 +598,7 @@ def two
597598
raise "rain!"
598599
end
599600
get '/exception'
600-
json = JSON.parse(last_response.body)
601+
json = MultiJson.decode(last_response.body)
601602
json["error"].should eql 'rain!'
602603
json["backtrace"].length.should > 0
603604
end

0 commit comments

Comments
 (0)