Closed compwron closed 7 years ago
If you would like to upgrade to RSpec 3 and think it would be valuable to do so, feel free. This file is probably going to be the trickiest https://github.com/Gazler/githug/blob/master/spec/githug_spec.rb
The only requirement I have is that all the existing versions of ruby specified in the .travis.yml
file are still supported.
I am having trouble running githug_spec.rb on my machine even without making any changes to the codebase. I am not sure why I am having this problem. Do you see any clues in these error traces?
git version 2.9.2```
10:26:41|~/repositories/githug: rspec spec/githug_spec.rb
From: /Users/me/repositories/githug/spec/githug_spec.rb @ line 24 :
19: @dir = Dir.pwd
20: `rake build`
21: `gem install pkg/githug-#{Githug::VERSION}.gem`
22: FileUtils.rm_rf("/tmp/git_hug")
23: Dir.chdir("/tmp")
=> 24: binding.pry
25: `echo "y" | githug`
26: Dir.chdir("/tmp/git_hug")
27: end
28:
29: after(:all) do
[1] pry(#<RSpec::Core::ExampleGroup::Nested_1>)> `echo "y" | githug`
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
/Users/me/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.13.6/lib/bundler/rubygems_integration.rb:393:in `block in replace_bin_path': can't find executable githug (Gem::Exception)
from /Users/me/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.13.6/lib/bundler/rubygems_integration.rb:419:in `block in replace_bin_path'
from /Users/me/.rvm/gems/ruby-1.9.3-p551/gems/githug-0.5.0/bin/githug:17:in `<top (required)>'
from /Users/me/.rvm/gems/ruby-1.9.3-p551/bin/githug:23:in `load'
from /Users/me/.rvm/gems/ruby-1.9.3-p551/bin/githug:23:in `<main>'
=> ""
[2] pry(#<RSpec::Core::ExampleGroup::Nested_1>)>
```Failures:
1) The Game solves the init level
Failure/Error: Dir.chdir("/tmp/git_hug")
Errno::ENOENT:
No such file or directory - /tmp/git_hug
# /Users/me/repositories/githug/spec/githug_spec.rb:26:in `chdir'
# /Users/me/repositories/githug/spec/githug_spec.rb:26:in `block (2 levels) in <top (required)>'
10:37:48|~/repositories/githug: gem list
*** LOCAL GEMS ***
bundler (1.13.6)
coderay (1.1.1)
diff-lcs (1.1.3)
githug (0.5.0)
grit (2.3.0)
method_source (0.8.2)
mime-types (1.25.1)
pry (0.10.4)
rake (10.5.0)
rspec (2.8.0)
rspec-core (2.8.0)
rspec-expectations (2.8.0)
rspec-mocks (2.8.0)
slop (3.6.0)
thor (0.14.6)
10:44:24|~/repositories/githug: ruby --version
ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-darwin15.6.0]
10:44:29|~/repositories/githug:
This suggests:
Failure/Error: Dir.chdir("/tmp/git_hug")
Errno::ENOENT:
That the test runner doesn't have permission to write to your temp directory, so the /tmp/git_hug
directory is never created.
That failure is because the /tmp/git_hug dir was not successfully created because of the error above /Users/me/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.13.6/lib/bundler/rubygems_integration.rb:393:in `block in replace_bin_path': can't find executable githug
I'm still not having luck fixing it; maybe I'll try making a docker container or something. What git/rvm versions do you use for local development?
I've developed and tested with various versions of ruby/git
Currently I am using ruby 2.3.0 and git 2.7.0
It may be worth trying the following commands on their own:
rake build
gem install pkg/githug-#{Githug::VERSION}.gem
Yep those pass on their own... I will do some more debugging tonight.
btw thank you for helping me with my weird dev box issues :)
I give up, I don't have the energy for this right now. I think that my local issues have to do with https://apple.stackexchange.com/questions/1043/why-is-tmp-a-symlink-to-private-tmp but I'm not sure. Good luck. :)
If you are interested in letting me upgrade the github test suite to rspec 3 (by way of rspec 2.99) I think that I might be able to do it, or at least get it started. What do you think? http://rspec.info/upgrading-from-rspec-2/