TDD and BDD Differences

I honestly don’t see the difference between BDD and TDD. That’s because there isn’t any. I mean, both are just tests if what is expected happens. That’s wrong. BDD and TDD have absolutely nothing whatsoever to do with testing. None. Nada. Zilch. Zip. Nix. Not in the slightest. Unfortunately, TDD has the word “test” in … Read more

Mockito: given versus when

I assume you are talking about Mockito syntax. From my point of view these are just different styles. The first is the normal Mockito syntax and the second just tries to fit nicer into BDD style tests – I really like the second version because it reads so nicely in BDD tests.

MongoDB.service failed with result exit-code

Just do those two commands for temporary solution: sudo rm -rf /tmp/mongodb-27017.sock sudo service mongod start For details: That shall be fault due to user permissions in .sock file, You may have to change the owner to monogdb user. sudo chown -R mongodb:mongodb /var/lib/mongodb sudo chown mongodb:mongodb /tmp/mongodb-27017.sock For more details visit Documentation for installation

Getting requirejs to work with Jasmine

I managed to get this working with some trial and error. The main issue was that when you write specs it isn’t a require that you want to create, you want to use define: Original: require([“/lib/jasmine/src/notepad”], function (notepad) { describe(“returns titles”, function() { expect(notepad.noteTitles()).toEqual(“pick up the kids get milk”); }); }); Working: define([“lib/jasmine/src/notepad”], function (notepad) … Read more

What are the differences between JBehave and Cucumber?

JBehave and Cucumber are completely different frameworks, although meant for the same purpose: acceptance tests. They are based around stories (JBehave) or features (Cucumber). A feature is a collection of stories, expressed from the point of view of a specific project stakeholder. In your tests, you are referring to the stories, typically via regular expression … Read more

What does regression test mean?

Regression test is a test that is performed to make sure that previously working functionality still works, after changes elsewhere in the system. Wikipedia article is pretty good at explaining what it is. Your unit tests are automatically regression tests, and that’s one of their biggest advantages. Once those tests are written, they will be … Read more

Using object types with Jasmine’s toHaveBeenCalledWith method

I’ve discovered an even cooler mechanism, using jasmine.any(), as I find taking the arguments apart by hand to be sub-optimal for legibility. In CoffeeScript: obj = {} obj.method = (arg1, arg2) -> describe “callback”, -> it “should be called with ‘world’ as second argument”, -> spyOn(obj, ‘method’) obj.method(‘hello’, ‘world’) expect(obj.method).toHaveBeenCalledWith(jasmine.any(String), ‘world’)

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)