Thursday, June 17, 2010

Expanding Config Files with Rake & Albacore

It took me forever to find this, but I finally did. Here is a great post which either directly states or points to how to use Rake and Albacore to build config files as part of the build process.

I had been searching for this information for a long time...

Wednesday, June 16, 2010

RhinoMocks - Method Signature & Null Reference Exception

OK, so it took me a while to figure this one out...

I would compile my project, would work fine, but when I ran the test, I would get "Object reference not set to the instance of an object" exception. I thought for the longest time it was my Mock object, but it wasn't.

The cause was because my method signature that I was stubbing was different than what I defined in my stub. So reflection couldn't find the method I was telling Rhino to stub.

Another interesting tidbit, the way I arranged my Given statements, I set an expectation on a Repository that method Get(int) would be called, then later in the Given I set the value of int. The mock was not prepared to handle "any" int, but only the one I set with the Expectation. Once I moved the assignment of int above the Mock Repository, it worked as expected.

As a side note, the order of the Given statements in the Feature determine the order the methods in the Spec are run. Interesting...

Monday, June 14, 2010

StructureMap Constructor Arguments

Here is how to pass dynamic StructureMap constructor arguments.

Sunday, June 13, 2010

PowerShell "dir" Command

I don't know why it took me so long to find the syntax for this command, but finally did:

dir -recurse -filter **

Thanks to this post for making it clear.

Thursday, June 10, 2010

YAML for Configuration Files

This post is a little introduction to using YAML to generate config files.

VB.NET and Lambdas

Man, VB.NET can be such a bummer...

Here's a description of how to get shorthand notation to work in VB.NET. It's no C#, but at least it's a workaround.

Wednesday, June 9, 2010

Launchy and VS

OH. MY. GAWD. These are exciting times. I've just discovered, thanks to the comments in this post, that I can have Launchy index *.sln files in a directory, then launch the file by using <Something_In_Solution_Name>, Enter.

That is cool.

Cucumber Tags and CI

This is a cool post showing how to use the tagging feature of Cucumber to prevent certain tests from running. It also describes how to make Rake ignore those features and scenarios.

Rake Continuous Build

Here is a great *quick* tutorial for using Rake for building apps, and some other handy tips.

Tuesday, June 8, 2010

Vim and Windows - Vindows

Here is a blog post with some great information regarding configuring VIM for a Windows installation. Saved me a bunch of time trying to figure out where VIM is looking for the configuration file.

BackgroundWorker and Exception Handling

Working on a new product that had an Exception that is not being caught by the UnhandledExceptionHandler. The cause seems to be stated in this blog post. The solution is:

1. Do not put any Try-Catch logic in the background process
2. Test the RunWorkerCompletedEventArgs Error property, which is the Exception from the process.

Thursday, June 3, 2010

Ruby Installation on Windows

Thanks to this post, I realized that prompts started from Launchy did not respect the Path update when Ruby was installed. Restarting Launchy made the path change stick.

Tuesday, June 1, 2010