Stub:
HTTParty.stub(get: file_content)
or mock:
HTTParty.should_receive(:get).with(foo, bar).and_return(file_content)
or stubbing in the new rspec syntax:
allow(HTTParty).to receive(:get).and_return(file_content)
or mocking in the new syntax:
expect(HTTParty).to receive(:get).with(foo, bar).and_return(file_content)