heroku/heroku — Issue #249: Test suite fails with fakefs 0.4.0
Author: voxik
Created: 2012-03-08 09:53:15+00:00
State: open

It might be because of fakefs 0.4.0 or Ruby 1.9.3, I am not sure. However I receive following errors:

```
1) Heroku::Auth asks for credentials when the file doesn't exist
Failure/Error: @cli.delete_credentials
Errno::ENOENT:
No such file or directory - /.heroku/credentials
# /usr/share/gems/gems/fakefs-0.4.0/lib/fakefs/fileutils.rb:33:in `block in rm'
# /usr/share/gems/gems/fakefs-0.4.0/lib/fakefs/fileutils.rb:32:in `each'
# /usr/share/gems/gems/fakefs-0.4.0/lib/fakefs/fileutils.rb:32:in `rm'
# /builddir/build/BUILD/rubygem-heroku-2.21.2/usr/share/gems/gems/heroku-2.21.2/lib/heroku/auth.rb:64:in `delete_credentials'
# /builddir/build/BUILD/rubygem-heroku-2.21.2/usr/share/gems/gems/heroku-2.21.2/spec/heroku/auth_spec.rb:120:in `block (2 levels) in '
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:80:in `instance_eval'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:80:in `block in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:173:in `with_around_hooks'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:77:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:355:in `block in run_examples'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:351:in `map'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:351:in `run_examples'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:337:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `map'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `block in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/reporter.rb:34:in `report'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:25:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80:in `run_in_process'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10:in `block in autorun'

2) Heroku::Auth legacy credentials should translate to netrc and cleanup
Failure/Error: File.open(@cli.legacy_credentials_path, "w") do |file|
Errno::ENOENT:
No such file or directory - No such file or directory - /.heroku/credentials
# /usr/share/gems/gems/fakefs-0.4.0/lib/fakefs/file.rb:418:in `create_missing_file'
# /usr/share/gems/gems/fakefs-0.4.0/lib/fakefs/file.rb:273:in `initialize'
# /builddir/build/BUILD/rubygem-heroku-2.21.2/usr/share/gems/gems/heroku-2.21.2/spec/heroku/auth_spec.rb:45:in `open'
# /builddir/build/BUILD/rubygem-heroku-2.21.2/usr/share/gems/gems/heroku-2.21.2/spec/heroku/auth_spec.rb:45:in `block (3 levels) in '
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:35:in `instance_eval'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:35:in `run_in'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:70:in `block in run_all'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:70:in `each'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:70:in `run_all'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:368:in `run_hook'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:292:in `block in run_before_each_hooks'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:292:in `each'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:292:in `run_before_each_hooks'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:217:in `run_before_each'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:79:in `block in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:173:in `with_around_hooks'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:77:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:355:in `block in run_examples'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:351:in `map'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:351:in `run_examples'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:337:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `block in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `map'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `map'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `block in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/reporter.rb:34:in `report'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:25:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80:in `run_in_process'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10:in `block in autorun'

3) Heroku::Auth API key is set via environment variable logout should delete saved credentials
Failure/Error: @cli.logout
Errno::ENOENT:
No such file or directory - /.heroku/credentials
# /usr/share/gems/gems/fakefs-0.4.0/lib/fakefs/fileutils.rb:33:in `block in rm'
# /usr/share/gems/gems/fakefs-0.4.0/lib/fakefs/fileutils.rb:32:in `each'
# /usr/share/gems/gems/fakefs-0.4.0/lib/fakefs/fileutils.rb:32:in `rm'
# /builddir/build/BUILD/rubygem-heroku-2.21.2/usr/share/gems/gems/heroku-2.21.2/lib/heroku/auth.rb:64:in `delete_credentials'
# /builddir/build/BUILD/rubygem-heroku-2.21.2/usr/share/gems/gems/heroku-2.21.2/lib/heroku/auth.rb:26:in `logout'
# /builddir/build/BUILD/rubygem-heroku-2.21.2/usr/share/gems/gems/heroku-2.21.2/spec/heroku/auth_spec.rb:110:in `block (4 levels) in '
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:35:in `instance_eval'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:35:in `run_in'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:70:in `block in run_all'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:70:in `each'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:70:in `run_all'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:368:in `run_hook'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:292:in `block in run_before_each_hooks'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:292:in `each'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:292:in `run_before_each_hooks'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:217:in `run_before_each'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:79:in `block in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:173:in `with_around_hooks'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:77:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:355:in `block in run_examples'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:351:in `map'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:351:in `run_examples'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:337:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `block in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `map'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `block in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `map'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `map'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `block in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/reporter.rb:34:in `report'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:25:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80:in `run_in_process'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10:in `block in autorun'
```