Sha256: 37a6bf89ae3b85a69b361a4327d9243bbb14d654b62b00a04d12ab5bf6054c66
Contents?: true
Size: 584 Bytes
Versions: 5
Compression:
Stored size: 584 Bytes
Contents
class BuyingProcess < Restfulie::Client::Mikyung::RestProcessModel at "http://localhost:3000/items" accept "application/xml" current_dir File.dirname(__FILE__) def initialize(*what) @what = what end def completed?(resource) resource.keys.first == "payment" end def self.run Restfulie::Common::Logger.logger.level = Logger::ERROR goal = BuyingProcess.new("Rest", "Calpis") result = Restfulie::Mikyung.new.achieve(goal).run result.response.code.should == 200 result.payment.amount.should == 410.0 puts "Goal Achieved" end end
Version data entries
5 entries across 5 versions & 2 rubygems