Sha256: 300b9500c2e87dd1287086f33ba80be9be47e2ff24d51920af41a5b9d006035b
Contents?: true
Size: 593 Bytes
Versions: 2
Compression:
Stored size: 593 Bytes
Contents
module CucumberCinema class PathStrategy #determines whether or not to take a screenshot def take_screenshot?(scenario, options={}) current_url=options[:url] #always take screenshots of scenario's with tag @action if scenario and scenario.source_tag_names.include?("@action") return true end if current_url #remove parameters and such path = URI.parse(current_url).path #remove model id's path = current_url.gsub(/\d+/, '') !BODY_HASHES.include?(path) else true end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cucumber-cinema-0.5.0 | lib/cucumber_cinema/path_strategy.rb |
cucumber-cinema-0.4.2 | lib/cucumber_cinema/path_strategy.rb |