Skip to content

Commit

Permalink
Require manual_builder in abstract_manual_service_registry
Browse files Browse the repository at this point in the history
The absence of this specific `require` statement meant that we were
seeing the following error in the development environment:

    NameError: uninitialized constant
      AbstractManualServiceRegistry::ManualBuilder

You could see this problem by either visiting
http://manuals-publisher.dev.gov.uk/manuals/new or by executing
`AbstractManualServiceRegistry.new.new({}).call` in the rails console.

We've investigated writing a failing test but it doesn't seem to be
possible because `ManualBuilder` is available in the test environment
but not in the development environment. This appears to be related to
the fact that `cache_classes` is `true` in test and `false` in
development.

We're fairly confident that this won't be a problem in production as
`cache_classes` is `true`.
  • Loading branch information
chrisroos committed Mar 10, 2017
1 parent 57638bd commit 01e4ab5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/services/abstract_manual_service_registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
require "withdraw_manual_service"
require "publish_manual_worker"
require "manual_observers_registry"
require "builders/manual_builder"

class AbstractManualServiceRegistry
def list(context)
Expand Down

0 comments on commit 01e4ab5

Please sign in to comment.