', function () {
test_situation.enter({}, system_spy, '');
expect(system_spy.write)
- .toHaveBeenCalledWith("This is the content of the testing situation.
\n");
+ .toHaveBeenCalledWith('\nThis is the content of the testing situation.
\n');
});
it('is agnostic about whether content is a string or a function', function () {
@@ -36,7 +41,15 @@ describe ('situation', function () {
test_situation.enter({}, system_spy, '');
expect(system_spy.write)
- .toHaveBeenCalledWith("Foo and bar.
\n");
+ .toHaveBeenCalledWith('');
+ });
+
+ it('adds classes to a if the classList attribute is specified', function () {
+ test_situation.classes = ['foo', 'bar'];
+ test_situation.enter({}, system_spy, '');
+
+ expect(system_spy.write)
+ .toHaveBeenCalledWith('');
});
it('generates a list of choices', function () {
@@ -47,4 +60,10 @@ describe ('situation', function () {
expect(system_spy.writeChoices).toHaveBeenCalledWith(['foo', 'foo-bar']);
});
+ it('writes into the current situation when a default writer is called', function () {
+ test_situation.act({}, system_spy, '_writer_testwriter');
+
+ expect(system_spy.writeInto).toHaveBeenCalled();
+ });
+
});
\ No newline at end of file