cabbage-ex / cabbage

Story BDD tool for executing elixir in ExUnit
MIT License
138 stars 33 forks source link

Fix Duplicate Scenario Runs #41

Closed rawkode closed 6 years ago

rawkode commented 6 years ago

List comprehension was creating a cartesian product of both subjects. Going with primitive increment

Closes #40

rawkode commented 6 years ago

Ah, because the rebinding is within the for context, I guess?

Your syntax is much cleaner, I wasn't aware of Enum.with_index. I'll adapt.

Thanks for the tips, @mgwidmann

rawkode commented 6 years ago

Sorry for the delay, but back with you now, @mgwidmann

rawkode commented 6 years ago

@mgwidmann It would be great to get this merged, please :+1:

Assuming I've not made a mess of it again :joy:

mgwidmann commented 6 years ago

Sorry I missed this! Out of curiosity, why'd you flip the number and the scenario name?

mgwidmann commented 6 years ago

Released in v0.3.4!

mgwidmann commented 6 years ago

Sorry I've had to pull version 0.3.4 because it isnt actually running any tests. In the before compile, the for loop used to return the quoted code but Enum.each does not which means no code is actually injected at compile time. To fix it, it should be an Enum.map, but then all the tests fail with an error like:

** (UndefinedFunctionError) function Cabbage.DataTableTest."test 0. Data table represented as a list of maps test Data table represented as a list of maps (0) Data table represented as a list of maps"/1 is undefined or private. Did you mean one of:

           * "test Data table represented as a list of maps (0) Data table represented as a list of maps"/1

I can try to look into it tonight, but I don't have time at the moment.

rawkode commented 6 years ago

@mgwidmann How do we add a test that verifies the quote test is correct?