@kenoir 

**UPDATE**: this happens a lot, I write a question and then the process of writing it has exposed the answer.

I think I've just realised how `queue` is working and is being referenced...

- calling `should_receive` on an object (in this case `AWS::SQS`) automagically stubs the object.
- so we stub `AWS::SQS` and return `sqs`
- `sqs` itself it a stub which returns both an object with a key value set to our empty stub `queue` (+ our empty stub `queue_collection`) when the `AWS::SQS.queues` Hash is accessed
- `queue_collection` itself returns our empty stub `queue` when the `AWS::SQS.queues.create` method is called
- `queue` is our empty stub which states if `exists?` is called on it then return `true`

---

~~Question: how does this work?~~ :confused:

~~Here is how I'm reading the test...~~

- ~~in our test code we create a new instance of the `subject`~~
- ~~the `subject`'s constructor (`Alephant::Queue`) internally calls `@q.exists?`~~
- ~~and back in our test code we have a stub that says "if `exists?` is called then return `true`"~~

~~...but my problem understanding how the test is working is that it doesn't look like we're creating a mock or a stub of the new `AWS::SQS` instance (which `Alephant::Queue` creates); instead it looks like `queue = double()` is creating an empty stub and then we're saying if that empty stub gets called with `exists?` then return `true`.~~

~~But how is that empty `queue` stub object being called?~~

~~The variable `queue` within the test doesn't correlate in any way I can tell to the `AWS::SQS` instance variable `@q` (created within `Alephant::Queue.new`)?~~