I like to wrap my classes on a global namespace such as:
@App = new Object
Looks like a good idea, I'll use it in my future projects!
I have issues trying to test blocking input into a text field. I made a jQuery plugin that forbids inputing number, spaces, or chars, but since triggering keypress, keyup or keydown dont actually print the value into the text field (it trigger the event but does not puts a value there) i have no way of making the correct expectation (not even with the sendkeys plugin).
Anyone knows how to test this kind of things?
Regarding the difference between
@Mine = Mine
seems to be local only, that is, that the implicit declaration will not expose Mine in the local scope, which might be a pitfall
You can refer to it as @Mine in the local scope.
So am I right in thinking that I have to invoke the methods that would otherwise have been called on page load? That is, we cannot rely upon DOM events firing for our fixtures? Integration testing is where you would want to test that (or call the function manually in the Jasmine test)?
If your fixture form's input had the same id (#order_card_number) then you could include order.js.coffee in the spec. But this is probably a bad idea as the tests lose isolation and it's not really a substitute for a full acceptance test with capybara/selenium.
Anyone know the key differences between jasminerice and evergreen?
If you don't use notification services like growl, put 'notification :off' at top of your Guardfile, and you won't see that notice when tests start up.
Thanks Ryan, I was wondering if you guys know why I keep getting a: "CreditCard is not defined" error? Even after following your tutorial word for word.
Jasmine can have problems if you have a catchall route at the end of your routes.rb file. To solve, you can add
mount Jasminerice::Engine => '/jasmine'
before the catchall in routes.rb
Cheers for that, twler.
Does anybody know if Travis CI will run this type of tests? Having a lot of trouble finding info. on that particular subject.
Thanks for adding this… really nice
It might be a good starting point.
First sign in through GitHub to post a comment.