I'm trying to set up my unit tests so that I can run them from Grunt using mocha_phantomjs. I can run them directly from the command line with the following statement:
mocha-phantomjs /test/helpers.html
and get the following output:
Helpers
| Right now we have one main application file, all of our Ember code, and a utils file which | |
| contains a number of helper functions. Those files, along with an assortment of 3rd party libs, | |
| and our "core" libs (Ember (and Data), Handlebars), etc. | |
| ``` | |
| <script type="text/javascript"> | |
| head.js( | |
| // Ember (and Data), Handlebars | |
| "https://emma-social.s3.amazonaws.com/assets/js/libs/min/core.libs-min.js", |
| describe("reports", function () { | |
| before(function() { | |
| Ember.run(Social, Social.advanceReadiness); | |
| }); | |
| afterEach(function() { | |
| Social.reset(); | |
| }); |
| ### Keybase proof | |
| I hereby claim: | |
| * I am commadelimited on github. | |
| * I am commadelimited (https://keybase.io/commadelimited) on keybase. | |
| * I have a public key whose fingerprint is 96B5 FCF6 F592 664C 58D5 0984 B7F3 0A64 5ECE C704 | |
| To claim this, I am signing this object: |
I'm trying to set up my unit tests so that I can run them from Grunt using mocha_phantomjs. I can run them directly from the command line with the following statement:
mocha-phantomjs /test/helpers.html
and get the following output:
Helpers
| App.PeopleController = Ember.ArrayController.extend({ | |
| sortAscending: true, | |
| sortProperties:['First', 'Last'], | |
| init: function(){ | |
| debugger; | |
| } | |
| }); |
I'm updating my unit tests to use the new Ember-QUnit approach and I'm running into a problem with one computed property test.
I'm trying to test that hire_date returns the correct string, but the test keeps failing with undefined is not a function. I know the setup is correct because another test, location_class, works just fine.
Can anyone offer insight as to why this is failing?
Source:
TypeError: undefined is not a function
at null.<anonymous> (http://0.0.0.0:8844/app/js/application.js:146:29)
pip install pyquerypython wiki.py | sayWith these two files in place (all dependencies met) I load the page at http://127.0.0.1:8000/ and get only the h1 (which is outside of the template). There are no errors, just emptiness. if I uncomment the renderTemplate method the content loads. On a side note, my models are not populating but I'm getting there.
My debug block:
DEBUG: Ember : 1.5.1 core.js:6268
DEBUG: Ember Data : 1.0.0-beta.8.2a68c63a core.js:6268
DEBUG: Handlebars : 1.3.0 core.js:6268
DEBUG: jQuery : 2.0.3 core.js:6268
DEBUG: ember-data-django-rest-adapter : 1.0.3
| // An existing code sample I have uses cURL (found below). | |
| // But is there a reason why someone would use the second example instead of the first example? | |
| // They both appear to do the exact same thing, but the first one is MUCH simpler. | |
| // Thoughts? | |
| <?php | |
| $response = file_get_contents("http://feeds.arstechnica.com/arstechnica/index?format=xml"); | |
| print_r($response); | |
| ?> |