travis-ci/travis-ci — pull request #407 by KL-7 (2012-02-04 15:50:09+00:00)
Title: Fix client specs.

While running full tests suit client side specs are failed with the following errors:

```
Failures:

1) Service hooks
As a registered user
I want to review my repositories and easily turn service hooks on and off
my repositories
Failure/Error: mock_omniauth
NameError:
undefined local variable or method `mock_omniauth' for #
# ./spec/client/service_hooks_spec.rb:9:in `block (2 levels) in '

2) Queueing and dequeuing builds
As anybody
I want to see which build jobs are queued
build gets queued
Failure/Error: dispatch_pusher_command 'jobs', 'build:queued', build_queued_event_info
NoMethodError:
undefined method `dispatch_pusher_command' for #
# ./spec/client/events/job_queue_spec.rb:24:in `block (2 levels) in '

3) Queueing and dequeuing builds
As anybody
I want to see which build jobs are queued
build is removed from queue
Failure/Error: dispatch_pusher_command 'jobs', 'build:queued', build_queued_event_info
NoMethodError:
undefined method `dispatch_pusher_command' for #
# ./spec/client/events/job_queue_spec.rb:32:in `block (2 levels) in '
```

I believe it's caused by helpers from `spec/client/support` not being included into rspec configuration.

While running specs `specs/spec_helper` is loaded first, requires all helpers from `spec/support` and [includes them](https://github.com/travis-ci/travis-ci/blob/master/spec/spec_helper.rb#L40) into rspec configuration. But as `spec/client/spec_helper` is loaded later helpers from `spec/client/support` that it [requires](https://github.com/travis-ci/travis-ci/blob/master/spec/client/spec_helper.rb#L1) are not included into configuration. Requiring these helpers directly in `specs/spec_helper` fixes the problem.