~caneypuggies/reformedchurcheslocator/couchapp-backbone

« back to all changes in this revision

Viewing changes to _attachments/js/vendor/requirejs/tests/plugins/fromText/fromTextConfig-tests.js

  • Committer: Tim Black
  • Date: 2013-09-16 22:50:16 UTC
  • Revision ID: tim@alwaysreformed.com-20130916225016-zk8jiba25z33ew7h
Versioned Bower vendor directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
require({
 
2
    baseUrl: requirejs.isBrowser ? './' : './plugins/fromText',
 
3
    paths: {
 
4
        'text': '../../../../text/text'
 
5
    },
 
6
    config: {
 
7
        'refine!b': {
 
8
            color: 'blue'
 
9
        },
 
10
        'refine!c': {
 
11
            color: 'cyan'
 
12
        }
 
13
    }
 
14
});
 
15
 
 
16
//The refine plugin changes the word refine into define.
 
17
define('refine!c', function (require, exports, module) {
 
18
    return {
 
19
        name: 'c',
 
20
        color: module.config().color
 
21
    };
 
22
});
 
23
 
 
24
require(['refine!b', 'refine!c'], function (b, c) {
 
25
 
 
26
    doh.register(
 
27
        'pluginsFromTextConfig',
 
28
        [
 
29
            function pluginsFromTextConfig(t){
 
30
                t.is('b', b.name);
 
31
                t.is('blue', b.color);
 
32
                t.is('c', c.name);
 
33
                t.is('cyan', c.color);
 
34
             }
 
35
        ]
 
36
    );
 
37
    doh.run();
 
38
});