Sha256: b06478e4fde4166334099090c523b76ba41711b01d58af9878b2150b627906ff
Contents?: true
Size: 1.27 KB
Versions: 3
Compression:
Stored size: 1.27 KB
Contents
Sham.define do sourcename { Faker::Name.name } sourcefeed { 'http://' + Faker::Internet.domain_name } title { Faker::Lorem.sentence(word_count = 10) } author { Faker::Name.name } summary { Faker::Lorem.sentences(sentence_count = 5).join(' ') } content { Faker::Lorem.sentences(sentence_count = 20).join(' ') } time_in_past { random_date_in_past(:year_range => 3) } guid { Faker::Internet.user_name * 5 } pretty_content { File.open("#{File.dirname(__FILE__)}/infosources_files/pretty.html").read } ugly_content { File.open("#{File.dirname(__FILE__)}/infosources_files/ugly.html").read } end Infosource.blueprint do sourcename sourcefeed end require 'feedzirra/feed_entry_utilities' class FeedEntry include Feedzirra::FeedEntryUtilities attr_accessor :title attr_accessor :author attr_accessor :summary attr_accessor :content attr_accessor :url attr_accessor :published attr_accessor :id end FeedEntry.blueprint do title author summary content url published { Sham.time_in_past } id { Sham.guid } end FeedEntry.blueprint(:known_source) do url { 'http://www.pretty.url/' + Faker::Internet.domain_word } content { nil } end FeedEntry.blueprint(:no_content_xpath) do url { 'http://www.skipped.url/' + Faker::Internet.domain_word } end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
solarsearch-0.0.10 | test/blueprints/infosources.rb |
solarsearch-0.0.9 | test/blueprints/infosources.rb |
solarsearch-0.0.6 | test/blueprints/infosources.rb |