diff options
author | Judson <nyarly@gmail.com> | 2017-05-31 09:44:46 -0700 |
---|---|---|
committer | Judson <nyarly@gmail.com> | 2017-05-31 09:44:46 -0700 |
commit | c4fc70f53cfaf673bde7fd009826d62bececa161 (patch) | |
tree | bab057e830f073cbf1c5460b11f0efc215724001 /pkgs/development/ruby-modules/testing | |
parent | e4bb4d4788547e09c35e85d1271ffb07122d2b1b (diff) |
Starting to add tool builder. Extracting bundler file computation.
Diffstat (limited to 'pkgs/development/ruby-modules/testing')
-rw-r--r-- | pkgs/development/ruby-modules/testing/assertions.nix | 8 | ||||
-rw-r--r-- | pkgs/development/ruby-modules/testing/tap-support.nix | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/development/ruby-modules/testing/assertions.nix b/pkgs/development/ruby-modules/testing/assertions.nix index 3cf67d6f3eb6a..f28cfcd508d47 100644 --- a/pkgs/development/ruby-modules/testing/assertions.nix +++ b/pkgs/development/ruby-modules/testing/assertions.nix @@ -3,7 +3,11 @@ equal = expected: actual: if actual == expected then (test.passed "= ${toString expected}") else - (test.failed "'${toString actual}'(${builtins.typeOf actual}) != '${toString expected}'(${builtins.typeOf expected})"); + (test.failed ( + "expected '${toString expected}'(${builtins.typeOf expected})" + + " != "+ + "actual '${toString actual}'(${builtins.typeOf actual})" + )); beASet = actual: if builtins.isAttrs actual then @@ -15,7 +19,7 @@ (ex: builtins.any (ac: ex == ac) (builtins.attrNames actual)) expected then (test.passed "has expected keys") else - (test.failed "keys differ: expected [${lib.concatStringsSep ";" expected}] have [${lib.concatStringsSep ";" (builtins.attrNames actual)}]"); + (test.failed "keys differ: expected: [${lib.concatStringsSep ";" expected}] actual: [${lib.concatStringsSep ";" (builtins.attrNames actual)}]"); havePrefix = expected: actual: if lib.hasPrefix expected actual then diff --git a/pkgs/development/ruby-modules/testing/tap-support.nix b/pkgs/development/ruby-modules/testing/tap-support.nix index ba576683d3727..3147ed066c118 100644 --- a/pkgs/development/ruby-modules/testing/tap-support.nix +++ b/pkgs/development/ruby-modules/testing/tap-support.nix @@ -2,7 +2,7 @@ with builtins; let withIndexes = list: genList (idx: (elemAt list idx) // {index = idx;}) (length list); - testLine = report: "${okStr report} ${toString report.index} ${report.description}" + testDirective report + testYaml report; + testLine = report: "${okStr report} ${toString (report.index + 1)} ${report.description}" + testDirective report + testYaml report; testDirective = report: ""; |