greghaskins / spectrum

A BDD-style test runner for Java 8. Inspired by Jasmine, RSpec, and Cucumber.
MIT License
145 stars 23 forks source link

When describe block contains () I am getting <no name> in IntelliJ #97

Closed zifnab87 closed 7 years ago

zifnab87 commented 7 years ago
describe("after creation of attribute", () -> {
        describe( "latest()", () -> {
                it("should return 200", () -> {
                    mockMvc.perform(get("/api/latest/attribute")).andExpect(status().isOk());
                });
        });
});

if I replace latest() with latest everything works fine!

image

image

Thank you!

greghaskins commented 7 years ago

@zifnab87 I have a sense of what the bug is here, probably related to #3.

Which version of Spectrum are you using? The fix to #3 hasn't landed in a release yet, it will be included with 1.1.0.

zifnab87 commented 7 years ago

Hi @greghaskins! I am using 1.0.2 :) Thanks!

ashleyfrieze commented 7 years ago

1.1.0 should fix this. Please try it.

ashleyfrieze commented 7 years ago

Please confirm that your issue is resolved @zifnab87

ashleyfrieze commented 7 years ago

@greghaskins - I'm pretty sure this is fixed, shall we close this issue?

greghaskins commented 7 years ago

JUnit4 does weird things with parentheses and string parsing of test names. 1.1.0 included a fix that at least makes this readable in IDEs (by replacing/cleaning weird characters in test names). Not ideal, but it works. JUnit5 will be much nicer in this regard.