Hey Chris,
As you can see, it looks for an existing record by calling #first with a conditions hash. If it doesn't find one, it calls FactoryGirl.create with the specified attribute and value. Because it looks for the first row that matches, having two matching rows means the database gets to decide which row to return. In some databases that's the first one that's created, but it's essentially undefined. You should make sure to only have one matching row.
You can specify an association by using the syntax `Attribute: Value` in a cucumber table. This will only work for attributes that have been defined as associations in your factories. There isn't currently a way to specify an association based on multiple attributes.
All that being said, we've largely stopped using the factory_girl step definitions in new projects, favoring higher level step definitions instead. The factory_girl step definitions can be harmful for the same reasons that web_steps weren't good. The author of Cucumber wrote about this in detail here:
http://aslakhellesoy.com/post/11055981222/the-training-wheels-came-off
-Joe