Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想避免为每个保护文件的 rspec 部分设置 CLI 选项,如下所示:
guard 'rspec', :cli => "--color --drb --format documentation", :version => 2 do
我完全取出了这些:cli选项并重新启动了 Guard,但它没有从~/.rspec. 我的项目目录中也没有 .rspec 点文件。
:cli
~/.rspec
关于如何将 Guard 与该点文件链接的任何想法?
rspec_dotfile = File.expand_path("~/.rspec") cli_options = File.exists?(rspec_dotfile) ? File.read(rspec_dotfile).chomp : "--some --default-options" guard 'rspec', :cli => cli_options, :version => 2 do # ... end