【文件属性】:
文件名称:ruby-string-showdown:双引号和单引号 Ruby 字符串……哪个会获胜?
文件大小:44KB
文件格式:ZIP
更新时间:2021-06-29 16:36:23
Ruby
Ruby 字符串对决
这是什么?
这个存储库包含一个用于 A/B 测试 Ruby 代码性能的测试工具,以及一些比较双引号和单引号字符串性能的测试。
如何运行测试
先决条件:
Ruby(这是基于 Ruby 版本 2.2.0,但其他版本应该可以正常工作。)
Bundler( gem install bundler可以解决这个问题。)
指示
克隆存储库
git clone git@github.com:vigetlabs/ruby-string-showdown.git
进入目录
cd ruby-string-showdown
安装依赖
bundle install
运行测试
ruby tests/fizzbuzz.rb
如何编写自己的测试
按照上面的安装说明进行操作。
在tests目录中创建一个新文件。
需要test_helper.rb文件。
require_relati
【文件预览】:
ruby-string-showdown-master
----test_helper.rb(148B)
----tests()
--------instantiation_small.rb(378B)
--------instantiation_huge.rb(130KB)
--------fizzbuzz.rb(597B)
--------test.rb(368B)
--------instantiation_tiny.rb(373B)
--------instantiation_big.rb(3KB)
--------single_concat_vs_double_interp.rb(407B)
--------explicit_parsing.rb(457B)
--------instantiation_medium.rb(3KB)
----Gemfile(91B)
----Gemfile.lock(1KB)
----.gitignore(24B)
----lib()
--------test_variant.rb(551B)
--------test.rb(1KB)
----README.md(1KB)