ManageIQ/manageiq — pull request #1253 by matthewd (2014-12-17 18:54:47+00:00)
Title: Use more descriptive assertions

The previous spelling:

```
xs.select { ..something.. }.should_not be_empty
```

can only fail when the filtered collection *is* empty. Which means the failure message is... less than helpful.

By using `.should include(..)`, when it fails, we're shown what *was* in there. This makes it much easier to work out why the particular expected value is absent.

The same issue doesn't apply to `.should be_empty`, but I've changed the two instances of that for symmetry.

---

Before:

```
1) MiqExpression.model_details with :typ=>tag VmCloud
Failure/Error: result.select { |r| r.first == "Instance.My Company Tags : Auto Approve - Max CPU" }.should_not be_empty
expected empty? to return false, got true
# ./spec/models/miq_expression/model_details_spec.rb:31:in `block (4 levels) in '
```

After:

```
1) MiqExpression.model_details with :typ=>tag VmCloud
Failure/Error: result.map(&:first).should include("Instance.My Company Tags : Auto Approve - Max CPU")
expected ["Vm Cloud.My Company Tags : Auto Approve - Max CPU", "Vm Cloud.Cloud/Infrastructure Provider.My Company Tags : Auto Approve - Max CPU", "Vm Cloud.Cluster.My Company Tags : Auto Approve - Max CPU", "Vm Cloud.Datastore.My Company Tags : Auto Approve - Max CPU", "Vm Cloud.Host.My Company Tags : Auto Approve - Max CPU", "Vm Cloud.Miq Group.My Company Tags : Auto Approve - Max CPU", "Vm Cloud.Repository.My Company Tags : Auto Approve - Max CPU", "Vm Cloud.Resource Pool.My Company Tags : Auto Approve - Max CPU", "Vm Cloud.Service.My Company Tags : Auto Approve - Max CPU", "Vm Cloud.User.My Company Tags : Auto Approve - Max CPU"] to include "Instance.My Company Tags : Auto Approve - Max CPU"
# ./spec/models/miq_expression/model_details_spec.rb:31:in `block (4 levels) in '
```