-
Notifications
You must be signed in to change notification settings - Fork 52
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
Fails to run on 2.99.0 project #66
Comments
Forgot to paste the code:
The offending code seems to be the after(), before() blocks. If I comment that particular before() block, another one in a different factory has the same failure. Does not happen when running the specs normally. |
After removing all before() and after() blocks from factory girl, I get the following:
|
Is your spec suite using environment variable |
Not that I know of:
|
Please try |
|
@yujinakayama is there any information I can give you to help? |
Hmm, though I still have no idea why it fails, try this: $ transpec --rspec-command "bundle exec rspec --require ./transpec_analysis_helper.rb" |
No luck :/. My spec_helper.rb:
|
What part of the project does transpec copy? The spec folder? Or the whole project? |
The whole project, or I should say the current working directory. |
Can you point the line |
Line 29 starts on the before:
Do you think that the undefined method error may be caused by rbenv installing the gem somewhere the copied directory cannot find? |
I think this may be helpful:
|
Was the error same as before when you ran |
I don't think so, unless you have run |
Yes, the error was the same when I ran it before. However, I added a line
in my spec_helper.rb and it gives me the error:
Maybe I could run 'gem install transpec' in my spec_helper as a hacky way to get it working? |
You don't need to require Please add the following to the top of your p defined?(TranspecAnalysis)
p ENV['SPEC_OPTS']
p Dir.pwd |
|
Hmm, it's really strange. The module |
Maybe I'm missing something, but where is the method actually defined? Can't find anything at https://github.com/yujinakayama/transpec/search?q=transpec_analyze&type=Code |
It's dynamically generated from this ERB: |
Alright, well I am going to call it quits on this for now. Will let you know if I get it working though. |
Doh, looks like there is a static analysis? Doing that :). |
By default Transpec performs static + dynamic analysis. With |
@yujinakayama well, I got a pretty decent conversion rate. I'm going to try the upgrade to 3.0.0 and see how it goes. Thanks for all your help.
|
Glad to hear that. Anyway it's much easier than manual rewriting. :) |
Absolutely! Looks like 3.0 upgrade was successful. Thanks1 |
@sgringwe do you have an @yujinakayama do you think it would make sense to adapt to this condition? And thanks for transpec – it's awesome! |
Released 2.2.2 with fix for the @inukshuk's case. |
@yujinakayama I'll soon run out of projects to test : ) But I just checked 2.2.2 and it works as advertised with my |
@inukshuk You need to start some projects with RSpec 2. :P Thanks for the great report! |
Perhaps a regression? I'm having the same issue with transpec 2.3.2. Was on factory_girl 4.3.0, upgraded to 4.4.0. I tried running
|
@yujinakayama i indeed had '--require spec_helper' in my .rspec file. That must have been it. |
@RobinDaugherty I was just investigating the issue :). It seems that @sgringwe's issue and @inukshuk's one were different. It's caused by undefining |
Relesed version 2.3.3 with the fix. |
I am getting an issue when running the transpec command. Currently on rspec 2.99.0:
Any ideas what the issue could be?
The text was updated successfully, but these errors were encountered: