Skip to content

Commit

Permalink
Set file field of feature struct
Browse files Browse the repository at this point in the history
the field `file` cabbage-ex/cabbage of was never set
  • Loading branch information
leifg committed Sep 6, 2017
1 parent 84723c0 commit 2615672
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/white_bread.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ defmodule WhiteBread do
end

defp read_in_feature_files(file_paths) do
file_paths |> Stream.map(&File.read!/1)
file_paths |> Stream.map(&({&1, File.read!(&1)}))
end

defp parse_features(feature_texts) do
Expand All @@ -46,8 +46,8 @@ defmodule WhiteBread do
|> Enum.map(&Task.await/1)
end

defp parse_task(feature_text) do
Task.async(fn -> Gherkin.Parser.parse_feature(feature_text) end)
defp parse_task({file_name, feature_text}) do
Task.async(fn -> Gherkin.Parser.parse_feature(feature_text, file_name) end)
end

defp filter_features(features, tags: tags, roles: roles) do
Expand Down

0 comments on commit 2615672

Please sign in to comment.