Sha256: d23627e4966a19c86019109795bc84cdb517139e0b5cc96f5cea770c6a5d99f5

Contents?: true

Size: 414 Bytes

Versions: 11

Compression:

Stored size: 414 Bytes

Contents

module Helpers
  def accessible? url
    resp = RestClient.get url
    resp.code == 200 ? true : false
  end

  def fake_sold_items
    sold_items = []

    count = 0
    items_amount = 3

    until count == items_amount do
      count = count+1
      sold_items.push({
          remote_id: Faker::Number.number(count),
          name: Faker::Commerce.product_name
      })
    end

    return sold_items
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rents-0.1.10 spec/helpers.rb
rents-0.1.9 spec/helpers.rb
rents-0.1.8 spec/helpers.rb
rents-0.1.7 spec/helpers.rb
rents-0.1.6 spec/helpers.rb
rents-0.1.5 spec/helpers.rb
rents-0.1.4 spec/helpers.rb
rents-0.1.3 spec/helpers.rb
rents-0.1.2 spec/helpers.rb
rents-0.1.1 spec/helpers.rb
rents-0.1.0 spec/helpers.rb