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

Add necessary requires to run the project initializer #1058

Merged
merged 1 commit into from
Jun 2, 2014

Conversation

fables-tales
Copy link
Member

No description provided.

@fables-tales
Copy link
Member Author

So.... The rails install generator failed because these requires weren't present (I reproduced the issue in my own local rails setup). I couldn't find any tests over this generator. Either I'm being obtuse, or we've got some missing coverage here. Does anyone have any thoughts?

@JonRowe
Copy link
Member

JonRowe commented Jun 2, 2014

Add some? :)

@fables-tales
Copy link
Member Author

@JonRowe I wanted to ask first to make sure I wasn't missing that there were some. Also, not sure what the best way to do this is. It roughly needs to go like this: make a new rails up, add the gem, run the initializer. Should that be in a spec, or a cuke? How should it get run? Where should it put the rails app?

@JonRowe
Copy link
Member

JonRowe commented Jun 2, 2014

(ping @cupakromer)

@cupakromer
Copy link
Member

The specs are part of the cukes. However, it seems that b/c this repo already has rspec-support installed as part of it, when that command is run rspec-support is already available 😬

@fables-tales
Copy link
Member Author

In order to actually test this we need to do a shell invocation of creating a new rails app, modifying the Gemfile and then running the install generator. This could all be done by a CLI Cuke.

@cupakromer
Copy link
Member

@samphippen I believe that is already part of the cuke process. It creates a new rails app in tmp/example_app runs the generators and then uses that for the remainder of the cukes:

@cupakromer
Copy link
Member

However, I see part of the problem. When it generates the app it skips creating the Gemfile. It appears to continue to use the base repos Gemfile.

@cupakromer
Copy link
Member

@samphippen If this is going to be an issue, why keep this line: RSpec::Support.require_rspec_core "project_initializer"? Why not just put the full require in: require 'rspec/core/project_initializer'? That would have prevented all this. :(

@myronmarston
Copy link
Member

Since this is broken, maybe we should merge and I can release 3.0.1 with this and then we can figure out the missing test coverage after that?

@fables-tales
Copy link
Member Author

@myronmarston I've nearly got a bash script running which reproduces the failure every time, locally. I think merging this now and then adding coverage later is better.

@morgoth
Copy link
Contributor

morgoth commented Jun 2, 2014

I have the same issue.

Additionally output of rails generate is missing rspec:install:

bin/rails generate --help
...
Rspec:
  rspec:feature
  rspec:observer

...

myronmarston added a commit that referenced this pull request Jun 2, 2014
Add necessary requires to run the project initializer
@myronmarston myronmarston merged commit 0269ccd into master Jun 2, 2014
@myronmarston myronmarston deleted the fix-rails-for-3.0.0 branch June 2, 2014 14:19
@myronmarston
Copy link
Member

rspec-rails 3.0.1 has been released with this fix.

@cupakromer
Copy link
Member

Thanks @myronmarston!!!!!!

@cupakromer cupakromer mentioned this pull request Jun 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants