heroku/heroku — Issue #250: Test suite fails when output is redirected to file
Author: voxik
Created: 2012-03-08 12:21:27+00:00
State: open

The $SUBJECT causes me troubles, when I try to build the package for Fedora, since the build redirects all output into file of course.

```
[root@dhcp-25-1 heroku-2.21.2]# rspec -Ilib spec
...................................................................................................................................................................................................................................................................................................................................

Finished in 2.15 seconds
323 examples, 0 failures

Randomized with seed 10786

[root@dhcp-25-1 heroku-2.21.2]# rspec -Ilib spec > out.txt
[root@dhcp-25-1 heroku-2.21.2]# cat out.txt
............................................................................................................................................................................FF...................................................................................................................F.................................

Failures:

1) Heroku::Command::Pgbackups single backup gets the url for the latest backup if nothing is specified
Failure/Error: @pgbackups.should_receive(:display).with('"'+latest_backup_url+'"')
# received :display with unexpected arguments
expected: ("\"http://latest/backup.dump\"")
got: ("http://latest/backup.dump")
# /builddir/build/BUILD/rubygem-heroku-2.21.2/usr/share/gems/gems/heroku-2.21.2/spec/heroku/command/pgbackups_spec.rb:29:in `block (3 levels) in '
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/error_generator.rb:80:in `__raise'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/error_generator.rb:34:in `raise_similar_message_args_error'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/message_expectation.rb:263:in `generate_error'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/message_expectation.rb:217:in `verify_messages_received'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/method_double.rb:117:in `block in verify'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/method_double.rb:117:in `each'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/method_double.rb:117:in `verify'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/proxy.rb:88:in `block in verify'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/proxy.rb:88:in `each'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/proxy.rb:88:in `verify'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/methods.rb:115:in `rspec_verify'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/space.rb:11:in `block in verify_all'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/space.rb:10:in `each'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/space.rb:10:in `verify_all'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks.rb:19:in `verify'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/mocking/with_rspec.rb:14:in `verify_mocks_for_rspec'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:222:in `run_after_each'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:86: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'

2) Heroku::Command::Pgbackups single backup gets the url for the named backup if a name is specified
Failure/Error: @pgbackups.should_receive(:display).with('"'+named_url+'"')
# received :display with unexpected arguments
expected: ("\"http://latest/backup.dump\"")
got: ("http://latest/backup.dump")
# /builddir/build/BUILD/rubygem-heroku-2.21.2/usr/share/gems/gems/heroku-2.21.2/spec/heroku/command/pgbackups_spec.rb:43:in `block (3 levels) in '
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/error_generator.rb:80:in `__raise'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/error_generator.rb:34:in `raise_similar_message_args_error'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/message_expectation.rb:263:in `generate_error'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/message_expectation.rb:217:in `verify_messages_received'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/method_double.rb:117:in `block in verify'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/method_double.rb:117:in `each'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/method_double.rb:117:in `verify'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/proxy.rb:88:in `block in verify'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/proxy.rb:88:in `each'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/proxy.rb:88:in `verify'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/methods.rb:115:in `rspec_verify'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/space.rb:11:in `block in verify_all'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/space.rb:10:in `each'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks/space.rb:10:in `verify_all'
# /usr/share/gems/gems/rspec-mocks-2.8.0/lib/rspec/mocks.rb:19:in `verify'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/mocking/with_rspec.rb:14:in `verify_mocks_for_rspec'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:222:in `run_after_each'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:86: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::Command::Logs logs with log output prettifies output
Failure/Error: output.should == "\e[36m2011-01-01T00:00:00+00:00 app[web.1]:\e[0m test"
expected: "\e[36m2011-01-01T00:00:00+00:00 app[web.1]:\e[0m test"
got: "2011-01-01T00:00:00+00:00 app[web.1]: test" (using ==)
# /usr/share/gems/gems/rspec-expectations-2.8.0/lib/rspec/expectations/fail_with.rb:32:in `fail_with'
# /usr/share/gems/gems/rspec-expectations-2.8.0/lib/rspec/matchers/operator_matcher.rb:47:in `fail_with_message'
# /usr/share/gems/gems/rspec-expectations-2.8.0/lib/rspec/matchers/operator_matcher.rb:69:in `__delegate_operator'
# /usr/share/gems/gems/rspec-expectations-2.8.0/lib/rspec/matchers/operator_matcher.rb:59:in `eval_match'
# /usr/share/gems/gems/rspec-expectations-2.8.0/lib/rspec/matchers/operator_matcher.rb:28:in `block in use_custom_matcher_or_delegate'
# /builddir/build/BUILD/rubygem-heroku-2.21.2/usr/share/gems/gems/heroku-2.21.2/spec/heroku/command/logs_spec.rb:28:in `block (4 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/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'

Finished in 2.12 seconds
323 examples, 3 failures

Failed examples:

rspec ./spec/heroku/command/pgbackups_spec.rb:24 # Heroku::Command::Pgbackups single backup gets the url for the latest backup if nothing is specified
rspec ./spec/heroku/command/pgbackups_spec.rb:34 # Heroku::Command::Pgbackups single backup gets the url for the named backup if a name is specified
rspec ./spec/heroku/command/logs_spec.rb:26 # Heroku::Command::Logs logs with log output prettifies output

Randomized with seed 7076
```