Sha256: ba1e4a95622de9dd6e45cd94cc6eccd5b68da7e6b780068ea07d804824b34201

Contents?: true

Size: 551 Bytes

Versions: 2

Compression:

Stored size: 551 Bytes

Contents

class DisableExternalTests
  attr_accessor :tests_to_disable

  def disable(top_level_example_group)
    tests_to_disable.each do |to_disable|
      example_group = top_level_example_group

      example_description = to_disable.pop

      to_disable.each do |description|
        example_group = example_group.children.select{ |g| g.description == description }.first
      end

      example = example_group.examples.select{ |e| e.description == example_description }.first

      example.metadata[:external_test_disabled] = true
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ryansch-capybara-mechanize-1.0.1 spec/support/disable_external_tests.rb
ryansch-capybara-mechanize-1.0.0 spec/support/disable_external_tests.rb