Fix various issues and add improved test for dependency resolution
This commit is contained in:
1 parent
6fedb185e2
commit
c82b4a2945
4 files changed
+23
-3
No files matched your search
@@ -2,7 +2,7 @@ class LogicUnitReceiver
|
||||
include Laradi::Mixin
|
||||
|
||||
def get_unit
|
||||
dependencies :logic_unit
|
||||
dependencies(:logic_unit) => {logic_unit:}
|
||||
|
||||
logic_unit
|
||||
end
|
||||
|
||||
+5
-1
@@ -14,7 +14,11 @@ class LaradiTest < ActiveSupport::TestCase
|
||||
test "It can inject dependencies" do
|
||||
lur = LogicUnitReceiver.new
|
||||
|
||||
assert_not_nil lur.get_unit
|
||||
result = lur.get_unit
|
||||
|
||||
assert_not_nil result
|
||||
|
||||
assert_kind_of(LogicUnit, result)
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user