Sha256: 382582192b2fa0c870d8f30a92789d3fc0689d424f19cb37597349fdf8cc1114

Contents?: true

Size: 446 Bytes

Versions: 5

Compression:

Stored size: 446 Bytes

Contents

require_relative 'helper.rb'

After do |scenario|
  scenario_name = scenario.name.gsub(/\s+/, '_').tr('/', '_')
  scenario_name = scenario_name.gsub(',', '')
  scenario_name = scenario_name.gsub('(', '')
  scenario_name = scenario_name.gsub(')', '')
  scenario_name = scenario_name.gsub('#', '')

  if scenario.failed?
    take_screenshot(scenario_name.downcase!, 'failed')
  else
    take_screenshot(scenario_name.downcase!, 'passed')
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubygene-0.3.3 lib/SkeletonWeb/features/support/hooks.rb
rubygene-0.3.1 lib/SkeletonWeb/features/support/hooks.rb
rubygene-0.3.0 lib/SkeletonWeb/features/support/hooks.rb
rubygene-0.2.0 lib/SkeletonWeb/features/support/hooks.rb
rubygene-0.1.0 lib/SkeletonWeb/features/support/hooks.rb