Sha256: 4c6f580a7e67214dba6af5d0478d63bf9c19a0722142bd9daa398af11a573064
Contents?: true
Size: 922 Bytes
Versions: 4
Compression:
Stored size: 922 Bytes
Contents
require 'helper' describe WorldbankAsDataframe::Topic do context 'find' do it 'returns an instance of Topic' do stub_get('topics/6?format=json'). to_return(:status => 200, :body => fixture('topic_6.json')) @environment = WorldbankAsDataframe::Topic.find(6).fetch a_get('topics/6?format=json').should have_been_made @environment.should be_a WorldbankAsDataframe::Topic end context 'returned topic has' do before do stub_get('topics/6?format=json'). to_return(:status => 200, :body => fixture('topic_6.json')) @environment = WorldbankAsDataframe::Topic.find(6).fetch end it 'name' do @environment.name.should eql 'Environment ' end it 'id' do @environment.id.should eql '6' end it 'note' do @environment.note[0..20].should eql "Natural and man-made " end end end end
Version data entries
4 entries across 4 versions & 1 rubygems