Files
react-native/scripts/cocoapods/__tests__/test_utils/SysctlCheckerMock.rb
T
Riccardo Cipolleschi 7a2704455f Move cocoapods utilities to utils.rb - Part 1 (#33978)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33978

This Diff moves part of the utilities from the `react_native_pods` file to a specific `utils.rb` file.

It adds tests for these utils and improve our test mocks.

The goal is to simplify the `react_native_pods.rb` so it's easier to work with it.

I decided to split this diff in 2 because it was becoming quite big.

## Changelog

[iOS][Changed] - Refactoring part of the react_native_pods.rb script

Reviewed By: cortinico

Differential Revision: D37004347

fbshipit-source-id: a5156f7c199d082d5d895a58af80948556c51c2a
2022-06-10 07:25:52 -07:00

22 lines
554 B
Ruby

# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Mock object for SysctlChecker
class SysctlChecker
@@call_sysctl_arm64_return_value = 1
def call_sysctl_arm64
return @@call_sysctl_arm64_return_value
end
def self.set_call_sysctl_arm64_return_value(newValue)
@@call_sysctl_arm64_return_value = newValue
end
def self.reset()
@@call_sysctl_arm64_return_value = 1
end
end