spec/api/question_spec.rb in triviacrack-0.2.0 vs spec/api/question_spec.rb in triviacrack-0.3.0

- old
+ new

@@ -38,8 +38,12 @@ context 'given that the request fails' do let(:code) { 400 } let(:answer) { 1 } it { expect{ subject }.to raise_error TriviaCrack::Errors::RequestError } + it { expect{ subject }.to raise_error(an_instance_of(TriviaCrack::Errors::RequestError) + .and having_attributes(code: code)) } + it { expect{ subject }.to raise_error(an_instance_of(TriviaCrack::Errors::RequestError) + .and having_attributes(url: "/api/users/#{session.user_id}/games/#{game_id}/answers")) } end end end