So I'm starting to learn how to write unit tests, and I'm starting with Rails (I've fixed a few Rspec tests to start, but now I'm writing Javascript ones).
I understand at least the basics of an MVC framework, and I understand Models (In rails at least). I still need to learn more though of course.
However, when running unit tests (I'm using teaspoon-jasmine right now)...what exactly is happening?
Lets say I'm testing a Function in X controller, is that controller being called by itself? Or is the app and all controllers being initiated? Or what? What about if the function interacts with the DOM....how does that work? I know you can use fixtures but what would it normally do? Does a view or something get called by itself with no data?
The whole process is just a bit confusing, I understand integration tests because the server literally gets fired up and steps through each component, but I'm not sure how unit tests actually run.