depot/pkgs/development/ruby-modules/bundler-env/test.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

33 lines
783 B
Nix

{ callPackage, test, stubs, should}:
let
bundlerEnv = callPackage ./default.nix stubs // {
basicEnv = callPackage ../bundled-common stubs;
};
justName = bundlerEnv {
name = "test-0.1.2";
gemset = ./test/gemset.nix;
};
pnamed = bundlerEnv {
pname = "test";
gemdir = ./test;
gemset = ./test/gemset.nix;
gemfile = ./test/Gemfile;
lockfile = ./test/Gemfile.lock;
};
in
builtins.concatLists [
(test.run "bundlerEnv { name }" justName {
name = should.equal "test-0.1.2";
})
(test.run "bundlerEnv { pname }" pnamed
[
(should.haveKeys [ "name" "env" "postBuild" ])
{
name = should.equal "test-0.1.2";
env = should.beASet;
postBuild = should.havePrefix "/nix/store";
}
])
]