Showing posts with label unit tests. Show all posts
Showing posts with label unit tests. Show all posts

Wednesday, 11 March 2015

and I'm there!

Well I'm not really there, I'm actually a very long way away, but...

I have now something that's just about useable, it doesn't all work exactly as it should, it looks bloody ugly in places especially the edit and add forms.

However I am now in a place where I can start writing some front end tests. I'm expecting a large proportion of them to fail, I know the start cooking at the top is broken.  I know edit doesn't work.  I do however have enough of a framework that all the right fields are there and they all do something.

I'm pleased with where I've got to, however I'm aware that there is a lot more work to do...

Now the real fun begins...

This is where I've got to so far:
lunch.ben.best

Monday, 1 December 2014

unit tests because "later equals never"

Having re-read my previous post and having come across Robert Greiner's quote "Later equals never" again I decided to stop and figure out how the unit testing worked within meteor.  This led to me finding Velocity which looks really interesting. Unfortunately my laptop decided that I wasn't able to use git any more.  I've now fixed this but it means I've only now been able to get the example application downloaded.  I've read the details on their website and think that this should be feasible, but it'll be tomorrow now before I get to play with it properly.

I'll also probably be revisiting the code that I'm not happy with before I continue moving on, I say probably as I'm still not certain of the right way of doing this.  Hopefully all will become clear as I read more of the meteor book.  The next chapter is on adding users which should be interesting.  I tried to do this myself previously with meteor and really messed it up, so it'll be nice reading how it's supposed to be done.

Sunday, 30 November 2014

playing with meteor some more...

Continuing with the playing with meteor.
I've now deployed where I am to http://benslunch.meteor.com/ I had a bit of a problem with this as when you deploy to meteor you need you username.  When you login on the website you use your email address, however when deploying you need your "username" something I set up about a year ago and haven't used much since. I couldn't remember or find it on the meteor.com website.
Eventually as is often the case stack overflow showed me the way.
It's slow going in between cinema trips (go and see Paddington, it's very good) and work, but I'm getting there and I'm really enjoying it.  I continued with the clean code book last night (there's that pay me money link again) it's interesting but I don't think I'm quite getting it yet.  I've also kept the github repo up to date if anyone is interested.
I've ended up creating a helper function in javascript (in the step_item.js file) that I'm really not happy with.  It works and so I'll keep it there for now with an eye to refactoring later.  There's a couple of ways I am currently thinking of doing that: Putting it into a global client scope or putting the logic into the template. I'm not over the moon about either of those and I'm hoping as I continue with the tutorial book (discovermeteor.com) I'll find a better solution.

I know that meteor does allow me to run unit tests, but I've not got to that point in the book.  If I'm still getting frustrated with the code clean book I'll start to skip ahead.  At the moment I'm doing this project for fun so I'm doing the fun bits, I'm a little concerned that I'm going to spend a fair chunk of time writing unit tests for existing code, something that I have depressing experience of and am not really looking forward to.