Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing the spaces in file paths in the rerun file causing the file list ... #793

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cucumber/cli/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def feature_files
Dir["#{path}/**/*.feature"].sort
elsif path[0..0] == '@' and # @listfile.txt
File.file?(path[1..-1]) # listfile.txt is a file
IO.read(path[1..-1]).split
IO.read(path[1..-1]).split(/(.*?\.feature.*?) /).collect(&:strip).reject(&:empty?)
else
path
end
Expand Down
15 changes: 15 additions & 0 deletions spec/cucumber/cli/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,21 @@ def reset_config
config.feature_files.should == ["cucumber.feature"]
end

it "should get the feature files from the rerun file" do
File.stub(:directory?).and_return(false)
File.stub(:file?).and_return(true)
IO.stub(:read).and_return(
"cucumber.feature:1:3 cucumber space.feature:134 domain folder/cuke.feature:1 domain folder/different cuke:4:5" )

config.parse!(%w{@rerun.txt})

config.feature_files.should == [
"cucumber.feature:1:3",
"cucumber space.feature:134",
"domain folder/cuke.feature:1",
"domain folder/different cuke:4:5"]
end

it "should allow specifying environment variables on the command line" do
config.parse!(["foo=bar"])
ENV["foo"].should == "bar"
Expand Down