Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Replace ControllerConfiguration.new by a factory method for testability. #11

@ReneB

Description

@ReneB

Currently, the tests say

it "yields the new instance to the builder block" do
  expect { |block|
      Arrthorizer::Rails::ControllerConfiguration.new(&block)
  }.to yield_with_args(an_instance_of(Arrthorizer::Rails::ControllerConfiguration))
end

This is not entirely accurate. If we replace the constructor with a factory method, we can stub the result from new and have more control over what we're testing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions