Skip to content
Permalink
Browse files
fix(core): shorthand \Question.where\ replaced by \`Question.about\…
…` as \`where\` was both incorrect and

affects: @serenity-js/core
  • Loading branch information
jan-molak committed Oct 22, 2017
1 parent bbe2329 commit 46abbd311874ff156266f792285f910ac8516cf9
Showing with 2 additions and 2 deletions.
  1. +1 −1 packages/core/spec/screenplay.spec.ts
  2. +1 −1 packages/core/src/screenplay/question.ts
@@ -111,7 +111,7 @@ describe('Screenplay Pattern', () => {
it('can be implemented as a one-liner', () => {
const chris = Actor.named('Chris').whoCan(PlayAnInstrument.suchAs(acousticGuitar));

const NumberOfGuitarStringsLeft = () => Question.where(`#actor checks how many strings are left`, actor => 6);
const NumberOfGuitarStringsLeft = () => Question.about(`the number of strings left`, actor => 6);

expect(NumberOfGuitarStringsLeft().answeredBy(chris)).to.equal(6);
});
@@ -1,7 +1,7 @@
import { UsesAbilities } from './actor';

export abstract class Question<T> {
static where = <R>(description: string, body: (actor: UsesAbilities) => R): Question<R> =>
static about = <R>(description: string, body: (actor: UsesAbilities) => R): Question<R> =>
new AnonymousQuestion<R>(description, body);

abstract answeredBy(actor: UsesAbilities): T;

0 comments on commit 46abbd3

Please sign in to comment.