Sha256: 98f82e19ded20d44314b1911b61da486bf581b72ed0b0b053f2d01cf431e51ac

Contents?: true

Size: 498 Bytes

Versions: 16

Compression:

Stored size: 498 Bytes

Contents

module Landable
  module Spec
    module CoreHelpers
      def random_uuid
        SecureRandom.uuid
      end

      def at_json(path, object = last_json)
        path.split('/').reduce object do |parent, key|
          key = key.to_i if Array === parent
          parent.fetch key
        end
      end
    end

    module HttpHelpers
      def encode_basic_auth(username, token)
        ActionController::HttpAuthentication::Basic.encode_credentials(username, token)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
landable-1.13.1 spec/support/helpers.rb
landable-1.12.3 spec/support/helpers.rb
landable-1.12.2 spec/support/helpers.rb
landable-1.12.1 spec/support/helpers.rb
landable-1.11.1 spec/support/helpers.rb
landable-1.11.0 spec/support/helpers.rb
landable-1.10.0.rc2 spec/support/helpers.rb
landable-1.10.0.rc1 spec/support/helpers.rb
landable-1.9.2 spec/support/helpers.rb
landable-1.9.1 spec/support/helpers.rb
landable-1.9.0 spec/support/helpers.rb
landable-1.9.0.rc2 spec/support/helpers.rb
landable-1.9.0.rc1 spec/support/helpers.rb
landable-1.8.0 spec/support/helpers.rb
landable-1.7.1.rc1 spec/support/helpers.rb
landable-1.7.0 spec/support/helpers.rb