3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/ruby-modules/bundler-env/test.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
783 B
Nix
Raw Normal View History

{ callPackage, test, stubs, should}:
2017-05-01 17:07:42 +01:00
let
bundlerEnv = callPackage ./default.nix stubs // {
2017-05-27 23:19:34 +01:00
basicEnv = callPackage ../bundled-common stubs;
2017-05-01 17:07:42 +01:00
};
justName = bundlerEnv {
2017-05-15 17:36:30 +01:00
name = "test-0.1.2";
2017-05-01 17:07:42 +01:00
gemset = ./test/gemset.nix;
};
2017-05-15 17:36:30 +01:00
pnamed = bundlerEnv {
2017-05-01 17:07:42 +01:00
pname = "test";
gemdir = ./test;
2017-05-01 17:07:42 +01:00
gemset = ./test/gemset.nix;
gemfile = ./test/Gemfile;
lockfile = ./test/Gemfile.lock;
2017-05-01 17:07:42 +01:00
};
2017-05-27 23:19:34 +01:00
in
builtins.concatLists [
2017-05-01 17:07:42 +01:00
(test.run "bundlerEnv { name }" justName {
2017-05-15 17:36:30 +01:00
name = should.equal "test-0.1.2";
2017-05-01 17:07:42 +01:00
})
(test.run "bundlerEnv { pname }" pnamed
[
(should.haveKeys [ "name" "env" "postBuild" ])
{
2017-05-15 17:36:30 +01:00
name = should.equal "test-0.1.2";
env = should.beASet;
postBuild = should.havePrefix "/nix/store";
}
])
2017-05-27 23:19:34 +01:00
]