-
-
Save jimsynz/2409266 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypeError: Object #<World> has no method 'visit' | |
at World.<anonymous> (/Users/jnh/Dev/ember-newsflash/features/step_definitions/inMemoryAdapter.coffee:8:19) | |
at Object.invoke (/Users/jnh/Dev/ember-newsflash/node_modules/cucumber/lib/cucumber/support_code/step_definition.js:29:14) | |
at Object.execute (/Users/jnh/Dev/ember-newsflash/node_modules/cucumber/lib/cucumber/ast/step.js:142:22) | |
at Object.acceptVisitor (/Users/jnh/Dev/ember-newsflash/node_modules/cucumber/lib/cucumber/ast/step.js:133:12) | |
at Object.executeStep (/Users/jnh/Dev/ember-newsflash/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:170:12) | |
at Object.processStep (/Users/jnh/Dev/ember-newsflash/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:165:14) | |
at /Users/jnh/Dev/ember-newsflash/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:67:16 | |
at callUserFunctionAndBroadcastAfterEvent (/Users/jnh/Dev/ember-newsflash/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:91:9) | |
at iterate (/Users/jnh/Dev/ember-newsflash/node_modules/cucumber/lib/cucumber/type/collection.js:14:11) | |
at /Users/jnh/Dev/ember-newsflash/node_modules/cucumber/lib/cucumber/type/collection.js:20:11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#step definitions... | |
path = require 'path' | |
inMemoryAdapterWrapper = -> | |
@Given /^an ember app is loaded in the browser$/, (callback)-> | |
@visit 'http://localhost:3000/', (success)-> | |
if success | |
callback() | |
else | |
callback.fail "Couldn't visit index" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zombie = require 'zombie' | |
exports.World = (callback)-> | |
world = | |
browser: new zombie.Browser() | |
visit: (url,callback)-> | |
self = @ | |
@browser.visit(url,()-> | |
callback(self.browser.success) | |
) | |
callback(world) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment