我正在使用本机反应,我只想链接我的字体而不是别的.
我正在使用react-native-maps,它在文档中特别说"不要使用react-native link"
无论我到哪里,我都会看到人们react-native link为了链接字体而说要做但我很怀疑是否有正确的语法来链接字体,如:
react-native link ./assets/fonts或者其他的东西?这样它也不会链接我所有的其他库
我正在尝试构建我的Rspec测试测试来测试我正在构建的ruby应用程序.我知道我应该先建立,但稍后进行测试.代码确实100%工作我只是在让Rspec查看我的代码时遇到问题.
github上的完整代码:https: //github.com/EsdrasEtrenne/tictactoe
到目前为止,我使用rspec运行的唯一文件是ruby/spec/game_spec.rb
game_spec.rb文件如下所示:
require_relative "../tictactoe"
Rspec.describe Tasks do
before(:each)do
@game = Tictactoe::Game.new
end
it "has a working method called play" do
expect{@game.play}.to output("WELCOME! To the unbeatable Tic-tac-toe").to_stdout
end
endRun Code Online (Sandbox Code Playgroud)
它需要tictactoe作为亲戚:
require "./components/tasks.rb"
require "./components/board.rb"
require "./components/player.rb"
require "./components/player_types/computer.rb"
require "./components/player_types/human.rb"
module Tictactoe
class Game
attr_reader :board, :player, :opponent, :tasks
def initialize
@board = Board.new
@tasks = Tasks.new
end
def play
@tasks.greet_players
@player, @opponent = @tasks.get_order
current_player, current_opponent = @player, @opponent
@tasks.print_board(@board)
until @board.game_is_over || @board.tie
@tasks.tell_turn(current_player) …Run Code Online (Sandbox Code Playgroud)