     describe '#trait', ->
 
       beforeEach ->
-        Factory.define 'trait', ->
+        Factory.define 'testFactSpecTrait', ->
           @trait('red', 'green', 'refactor')
 
       it 'returns undefined if no values match', ->
-        expect(Factory.create('refgreen-trait')).to.be.undefined
+        expect(Factory.create('refgreen-testFactSpecTrait')).to.be.undefined
 
       it 'returns one of the provided trait values', ->
-        Factory.create('green-trait').should.equal 'green'
-        Factory.create('red-trait').should.equal 'red'
+        Factory.create('green-testFactSpecTrait').should.equal 'green'
+        Factory.create('red-testFactSpecTrait').should.equal 'red'
 
       it 'returns the first encountered if multiple values match', ->
-        Factory.create('green-red-trait').should.equal 'green'
-        Factory.create('refactor-green-trait').should.equal 'refactor'
+        Factory.create('green-red-testFactSpecTrait').should.equal 'green'
+        Factory.create('refactor-green-testFactSpecTrait').should.equal 'refactor'
 
     describe 'sequence', ->
 

#= require ./../factories

describe 'Factory', ->

  beforeEach ->
    Factory.define 'user', (args...) ->
      args: args

  afterEach ->

  describe '::define', ->

    it 'registers a factory', ->
      result = Factory.create 'testFactSpecUser'
      result.args.should.deep.equal []

    it 'raises an error on existing factory', ->
      expect(-> Factory.define('testFactSpecUser', ->)).to.throw 'Factory user is already defined'

    it 'raises an error on naming conflict with traits', ->
      expect(-> Factory.define('admin-user', ->)).to.throw 'Factory name \'admin-user\' can\'t use - in name. It clashes with the traits construct'
