summary refs log tree commit diff
path: root/pkgs/development/ruby-modules/bundled-common/test.nix
diff options
context:
space:
mode:
authorJudson <nyarly@gmail.com>2017-05-31 09:44:46 -0700
committerJudson <nyarly@gmail.com>2017-05-31 09:44:46 -0700
commitc4fc70f53cfaf673bde7fd009826d62bececa161 (patch)
treebab057e830f073cbf1c5460b11f0efc215724001 /pkgs/development/ruby-modules/bundled-common/test.nix
parente4bb4d4788547e09c35e85d1271ffb07122d2b1b (diff)
downloadnixpkgs-c4fc70f53cfaf673bde7fd009826d62bececa161.tar
nixpkgs-c4fc70f53cfaf673bde7fd009826d62bececa161.tar.gz
nixpkgs-c4fc70f53cfaf673bde7fd009826d62bececa161.tar.bz2
nixpkgs-c4fc70f53cfaf673bde7fd009826d62bececa161.tar.lz
nixpkgs-c4fc70f53cfaf673bde7fd009826d62bececa161.tar.xz
nixpkgs-c4fc70f53cfaf673bde7fd009826d62bececa161.tar.zst
nixpkgs-c4fc70f53cfaf673bde7fd009826d62bececa161.zip
Starting to add tool builder. Extracting bundler file computation.
Diffstat (limited to 'pkgs/development/ruby-modules/bundled-common/test.nix')
-rw-r--r--pkgs/development/ruby-modules/bundled-common/test.nix29
1 files changed, 28 insertions, 1 deletions
diff --git a/pkgs/development/ruby-modules/bundled-common/test.nix b/pkgs/development/ruby-modules/bundled-common/test.nix
index b24a620ed50..ee3754595f3 100644
--- a/pkgs/development/ruby-modules/bundled-common/test.nix
+++ b/pkgs/development/ruby-modules/bundled-common/test.nix
@@ -7,7 +7,34 @@ let
   functions = (import ./functions.nix testConfigs);
 in
   builtins.concatLists [
-    (test.run "Filter empty gemset" {} (set: functions.filterGemset {inherit ruby; groups = ["default"]; } set == {}))
+    ( test.run "All set, no gemdir" (functions.bundlerFiles {
+      gemfile  = test/Gemfile;
+      lockfile = test/Gemfile.lock;
+      gemset   = test/gemset.nix;
+    }) {
+      gemfile  = should.equal test/Gemfile;
+      lockfile = should.equal test/Gemfile.lock;
+      gemset   = should.equal test/gemset.nix;
+    })
+
+    ( test.run "Just gemdir" (functions.bundlerFiles {
+      gemdir = test/.;
+    }) {
+      gemfile  = should.equal test/Gemfile;
+      lockfile = should.equal test/Gemfile.lock;
+      gemset   = should.equal test/gemset.nix;
+    })
+
+    ( test.run "Gemset and dir" (functions.bundlerFiles {
+      gemdir = test/.;
+      gemset = test/extraGemset.nix;
+    }) {
+      gemfile  = should.equal test/Gemfile;
+      lockfile = should.equal test/Gemfile.lock;
+      gemset   = should.equal test/extraGemset.nix;
+    })
+
+    ( test.run "Filter empty gemset" {} (set: functions.filterGemset {inherit ruby; groups = ["default"]; } set == {}))
     ( let gemSet = { test = { groups = ["x" "y"]; }; };
       in
       test.run "Filter matches a group" gemSet (set: functions.filterGemset {inherit ruby; groups = ["y" "z"];} set == gemSet))