depot/third_party/nixpkgs/pkgs/development/ruby-modules/bundler-env/test.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04: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";
}
])
]