Skip to content

Commit 8a58ac5

Browse files
committed
fix(shell_spec): Clear TODO list before testing
In other tests we add todos and this is a cached singleton attribute.
1 parent 35f8d6e commit 8a58ac5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spec/libraries/shell_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ class MyToDoList
1010
end
1111

1212
describe Shell do
13-
before { allow(MyToDoList).to receive(:puts) }
13+
before do
14+
MyToDoList.todos.clear
15+
allow(MyToDoList).to receive(:puts)
16+
end
1417

1518
describe ".todo" do
1619
it "should add given string as a todo by delegating to .add_todo" do

0 commit comments

Comments
 (0)