Sha256: b94a74f6969aeb646c5a7bc4e84bb120e38b43e74b952605c210708a67b15e9e
Contents?: true
Size: 624 Bytes
Versions: 1
Compression:
Stored size: 624 Bytes
Contents
require 'load_impact/page' # LoadImpact::UserScenario is a class that allows us to convert an array of URL's # into a Load Impact user scenario without using their record and playback tool. # # Example: # urls = %w[http://qa1load.nandomedia.com http://qa1load.nandomedia.com/news] # scenario = LoadImpact::UserScenario.new(urls) # puts scenario.to_s # module LoadImpact class UserScenario attr_reader :urls def initialize(urls) @urls = urls end def to_s <<-EOS.gsub(/^\s+\|\s/, '') | #{urls.map { |url| Page.new(url).to_s }.compact.join} | EOS end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
load_impact-0.0.3 | lib/load_impact/user_scenario.rb |