2020-01-28 01:32:29 +00:00
|
|
|
export default ability => hooks => {
|
|
|
|
hooks.beforeEach(function() {
|
|
|
|
this.ability = this.owner.lookup(`ability:${ability}`);
|
2021-04-29 20:00:59 +00:00
|
|
|
this.can = this.owner.lookup('service:can');
|
2020-01-28 01:32:29 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
hooks.afterEach(function() {
|
|
|
|
delete this.ability;
|
2021-04-29 20:00:59 +00:00
|
|
|
delete this.can;
|
2020-01-28 01:32:29 +00:00
|
|
|
});
|
|
|
|
};
|