Sha256: c186f5ceeba67c3ac9188e0c38fa153cf57ae10aa9ad9749bd7373cc1dca271e

Contents?: true

Size: 750 Bytes

Versions: 131

Compression:

Stored size: 750 Bytes

Contents

#   This module is used to namespace all of the methods from Avo::TestHelpers.
#
#   It loops through all of the public instance methods from Avo::TestHelpers and defines new methods in the current
# module with the same name but prefixed with "avo_".
#
#   For example, if Avo::TestHelpers has a public instance method called example_method, this code will define a new
# method called avo_example_method in Avo::PrefixedTestHelpers module which when called will call example_method
# with the same arguments.

module Avo
  module PrefixedTestHelpers
    include Avo::TestHelpers

    Avo::TestHelpers.public_instance_methods.each do |method|
      define_method("avo_#{method}") do |**args|
        send(method, **args)
      end
    end
  end
end

Version data entries

131 entries across 131 versions & 1 rubygems

Version Path
avo-3.0.0.pre13 lib/avo/prefixed_test_helpers.rb
avo-3.0.0.pre12 lib/avo/prefixed_test_helpers.rb
avo-3.0.0.pre10 lib/avo/prefixed_test_helpers.rb
avo-3.0.0.pre11 lib/avo/prefixed_test_helpers.rb
avo-3.0.0.pre8 lib/avo/prefixed_test_helpers.rb
avo-3.0.0.pre9 lib/avo/prefixed_test_helpers.rb
avo-3.0.0.pre7 lib/avo/prefixed_test_helpers.rb
avo-3.0.0.pre5 lib/avo/prefixed_test_helpers.rb
avo-3.0.0.pre6 lib/avo/prefixed_test_helpers.rb
avo-3.0.0.pre4 lib/avo/prefixed_test_helpers.rb
avo-3.0.0.pre3 lib/avo/prefixed_test_helpers.rb
avo-3.0.0.pre2 lib/avo/prefixed_test_helpers.rb
avo-3.0.0.pre1 lib/avo/prefixed_test_helpers.rb
avo-3.2.2 lib/avo/prefixed_test_helpers.rb
avo-3.2.1 lib/avo/prefixed_test_helpers.rb
avo-3.2.0 lib/avo/prefixed_test_helpers.rb
avo-3.1.7 lib/avo/prefixed_test_helpers.rb
avo-3.1.6 lib/avo/prefixed_test_helpers.rb
avo-3.1.5 lib/avo/prefixed_test_helpers.rb
avo-3.1.4 lib/avo/prefixed_test_helpers.rb