-
-
Couldn't load subscription status.
- Fork 62
Open
Labels
Description
Normally, syntax_tree will convert single-line do...end into braces. For example:
- expect do blah end.to(eq(5))
+ expect { blah }.to(eq(5))However, if the parenthesis are missing from to() (as they often are in rspec code), no attempt is made to use braces. The code remains as
expect do blah end.to eq(5)Context: in Discourse we previously had a number of things like
expect do
blah
end.to eq(5)That reads ok.
After syntax_tree formatting this has been moved onto a single line, and maintained the do ... end
expect do blah end.to eq(5)which is not ideal.
Flink, CvX, louim, rafaelss and MatthiasPortzel