Version of crystal:
Crystal 0.27.0 [c9d1eef8f] (2018-11-01)
LLVM: 4.0.0
Default target: x86_64-unknown-linux-gnu
When I mark a test as pending the count of tests and test output are malformed.
I wrote the following test.
describe "my tests" do
it "1 equals 1.0" do
1.should eq 1.0
end
end
Running the test correctly outputs one green test displays the expected output.
When I mark the test as pending, things will get interesting.
describe "my tests" do
it "1 equals 1.0" do
pending "something"
1.should eq 1.0
end
end
The output shows two examples and the verbose output is malformed with the word something
showing up twice on the first example listed and only 1.0
from the test name is shown, not the full name 1 equals 1.0
.
The non-verbose spec output also shows two examples, although is not malformed.
You should replace it
with pending, not nest pending
inside it
.
We could probably stop it
inside it
or similar, at runtime. But I think this issue should be closed. If anyone wants to implement the above, send a PR.
@RX14 Could we make it
/pending
undefined inside an it
?
@RX14 Definitely! That, and also disallowing it
outside of describe
, and also .should
outside it
. I think it's possible and it would be a great addition (I've been bitten by some of those in the past).
Let's keep this open to improve this situation.
Most helpful comment
@RX14 Definitely! That, and also disallowing
it
outside ofdescribe
, and also.should
outsideit
. I think it's possible and it would be a great addition (I've been bitten by some of those in the past).Let's keep this open to improve this situation.