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

aruba init --test-framework cucumber adds aruba to Gemfile incorrectly but reports it as successful. #430

Closed
dyspop opened this issue Apr 12, 2017 · 12 comments · Fixed by #570

Comments

@dyspop
Copy link

dyspop commented Apr 12, 2017

Summary

Initializing cucumber-ruby incorrectly appends the Gemfile and returns to stdout an incorrect success status.

Expected Behavior

source 'https://rubygems.org'

# Specify your gem's dependencies in wisu.gemspec
gemspec

group :test do
  gem 'cucumber'
  gem 'aruba'
end

group :development, :test do
  gem 'rspec-rails', '~> 3.5'
  gem 'aruba', '~> 0.14.2'
end

When I run $aruba init --test-framework cucumber it should either append correctly or in the very least it should not display a success response for the append.

Current Behavior

When I run $aruba init --test-framework cucumber at root it correctly creates features/support/aruba.rb and responds with a successful append Gemfile response, but inspection of the Gemfile shows that it appended it incorrectly:

$aruba init --test-framework cucumber
      create  features/support/aruba.rb
      append  Gemfile

Gemfile:

source 'https://rubygems.org'

# Specify your gem's dependencies in wisu.gemspec
gemspec

group :test do
  gem 'cucumber'
  gem 'aruba'
end

group :development, :test do
  gem 'rspec-rails', '~> 3.5'
endgem 'aruba', '~> 0.14.2'

Steps to Reproduce (for bugs)

above

Context & Motivation

I simply manually rewrote this. Since it's init it's not a huge deal but I can imagine it tripping someone up.

Your Environment

  • Version used: aruba (0.14.2)
  • Operating System and version: OS X El Capitan 10.11.6
  • Link to your project: Currently in a private repository
@dyspop
Copy link
Author

dyspop commented Apr 12, 2017

This is probably because I already had gem 'cucumber' in the wrong spot now that I look at it again. Do what you want with this.

@maxmeyer
Copy link
Member

Mmh. Can you check if your file contains a "\n" at the very end of the file?

@dyspop
Copy link
Author

dyspop commented Apr 24, 2017

Hhm. I didn't commit it in that state and moved on. Sorry!

@maxmeyer maxmeyer self-assigned this Jun 28, 2017
@maxmeyer maxmeyer added this to the 1.0.0-alpha.3 milestone Jul 31, 2017
@stale
Copy link

stale bot commented Nov 9, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the stale These issues were closed by stalebot and need to be reviewed to see if they're still relevant. label Nov 9, 2017
@stale
Copy link

stale bot commented Nov 16, 2017

This issue has been automatically closed because of inactivity. You can support the Cucumber core team on opencollective.

@stale stale bot closed this as completed Nov 16, 2017
@mvz
Copy link
Contributor

mvz commented Mar 15, 2018

I can reproduce this behavior using a Gemfile with no "\n" at the end.

@mvz mvz reopened this Mar 15, 2018
@stale stale bot removed the stale These issues were closed by stalebot and need to be reviewed to see if they're still relevant. label Mar 15, 2018
@stale
Copy link

stale bot commented May 14, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the stale These issues were closed by stalebot and need to be reviewed to see if they're still relevant. label May 14, 2018
@xtrasimplicity
Copy link
Member

Bump.

@stale stale bot removed the stale These issues were closed by stalebot and need to be reviewed to see if they're still relevant. label May 14, 2018
@stale
Copy link

stale bot commented Jul 13, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the stale These issues were closed by stalebot and need to be reviewed to see if they're still relevant. label Jul 13, 2018
@stale stale bot removed the stale These issues were closed by stalebot and need to be reviewed to see if they're still relevant. label Jul 13, 2018
@xtrasimplicity xtrasimplicity self-assigned this Jul 13, 2018
@luke-hill
Copy link
Contributor

This feels like a reproduction of the bug I raised a bit ago

#662

I'll close this as a duplicate in favour of the other one (Which is a more in-depth detailed look)

@mvz
Copy link
Contributor

mvz commented Sep 23, 2019

I think the problem here is similar, but still different since it occurs outside of cucumber scenarios. #570 seems to fix it.

@mvz mvz reopened this Sep 23, 2019
@luke-hill
Copy link
Contributor

I disagree, as that adds a newline only in one circumstance, whereas the generic fix is to fix up the append to cuke. But fair point, having the issues as separate I guess is valid.

@mvz mvz closed this as completed in #570 Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment