mardi 29 septembre 2015

How to stubNokogiri in spec

How to stub Nokogiri in fetch method ofPromoDate in RSpec

 class PromoDate

      def self.fetch_data(request)
         page = Nokogiri::HTML(open("#{request.host}#{url}")) 
      end

    end

Aucun commentaire:

Enregistrer un commentaire