question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG/REGRESSION] Injecting autogenerated controllers doesn't work in acceptance tests

See original GitHub issue

REPRODUCTION: https://github.com/cibernox/demo-inject-problem

  1. Clone and yarn
  2. Run the tests
  3. Expected error:

Attempting to inject an unknown injection: ‘controller:application’

Apparently this only happens in tests. During normal execution it works. It also works if instead of injecting an autogenerated controller you create an empty application controller.

It works in 2.13 but fails in 2.14-beta and canary.

/cc @rwjblue As discussed in slack ^

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
kjfcommented, Sep 20, 2017

Got bitten by this in my app today. It happened outside of the test environment. The workaround of generating a concrete controller worked but it feels like controller injection should work with autogenerated controllers.

1reaction
lockscommented, Jun 25, 2017

@djones ember generate controller application should work around the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to run tests because Nest can't resolve dependencies ...
Current behavior. I have followed the unit test example but I am unable to get my very simple test to run (it's literally...
Read more >
Best practices for writing unit tests - .NET - Microsoft Learn
Learn best practices for writing unit tests that drive code quality and resilience for .NET Core and .NET Standard projects.
Read more >
Unit test to ensure all required services are added to the .Net ...
Find all controllers through reflection, and try to construct them the same way MVC does - by getting dependent services from the DI...
Read more >
The Practical Test Pyramid - Martin Fowler
Automating their tests allows teams to know whether their software is broken in a matter of seconds and minutes instead of days and...
Read more >
Five Common Problems With your Regression Testing Strategy
Regression testing involves testing existing software to verify that working features are not broken by new development work. Regression testing is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found