(#403) Requiring require_all in broker.rb

This change requires require_all in the broker.rb file the same was as
in the model.rb file. This removes the need to explicitly require each
broker under the correspondingly named subdirectory.

The change is desirable because it enables people writing custom brokers
to just drop their Ruby file under the broker subdirectory and have it
required automatically by Razor.
(#401) Checking network status with nm-online

This change checks the network status at the top of the os_boot.erb
template for Red Hat 6 so that the script can connect to the Razor
daemon over the network. This is done by checking the status of
the NetworkManager service and calling the nm-online command, when
it's available, with a reasonable timeout that returns as soon as the
network is online. The command and the timeout values are taken from the
NetworkManager init script from CentOS, so it should be sane and should
not introduce any regressions.

The change is necessary in the context where a Red Hat derivative uses
Anaconda which configures the network with Network Manager. This is an
asynchronous process so the network might still be offline when rc.local
is called so the boot process never completes the handoff to the broker.
You must start Razor when running the tests

Our testing guide missed an essential step:

Because we only have acceptance style tests, not unit tests, it is
necessary to manually start the Razor daemon process before running
the test suite.

This updates the document to reflect that sadly omitted step.
Merge pull request #404 from cr3/403

(#403) Requiring require_all in broker.rb
Merge pull request #402 from cr3/401

(#401) Checking network status with nm-online
(#410) Move acceptance style spec tests into the acceptance directory

The previous "spec" test suite was really an acceptance / integration level
test: you had to have a fully functional end to end Razor stack to run
the test - including the nodejs web components, a data store, etc.

This is really valuable, and has brought a lot of value to development, but it
also makes it very hard to add actual unit style tests to validate small parts
of the functionality of the Razor codebase.

This moves aside the acceptance spec files, so that we no longer have them
sitting where Ruby convention dictates a unit style test suite would live.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Remove the local .rspec options file

The Razor repository includes an rspec options file, setting some cosmetic
options.  This will override any user configuration in their `~/.rspec` file,
which means that every developer is forced to use the same cosmetic output.

That really isn't polite - we should respect individual decisions about
unimportant aspects like the spec output format; removing this file allows
for that.

The worst case is that someone who expected the old behaviour now sees
the (admittedly, terrible) rspec default output format until they create their
own personal configuration in their home directory to fix that.

(Of course, they will then benefit: every project they work in will have those
defaults they like applied, so it should be an overall quality of life win
for everyone. :)

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
(#410) Build the stub rspec unit test suite

This adds the bones of an rspec test suite.  While *cough* extremely
limited *cough* at the moment, having the framework in place makes it easier
to start adding flesh to these empty bones.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
(#410) Create template spec stubs for all conventional classes

This creates a stub template spec with a minimal test - can the code load, and
does it define the constant we expect - for everything that complies with Ruby
convention for how code is loaded.

These are not deep tests, but they should ensure that we, at the least, manage
to load most of the code in the project when we run the spec tests.  That will
catch the worst of errors, that we fail to require the right things, or that
we have a syntax error.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Update test documentation to reflect unit test creation

This updates the testing guide to point folks at the unit tests, and to
indicate how to run the acceptance suite.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Merge pull request #411 from daniel-pittman/feature/master/410-make-a-real-unit-test-suite-for-razor

#410 make a real unit test suite for razor
(#410) Move the acceptance spec tests to the correct location

Embarrassingly, my previous pull request for #410 was incorrect.  I had
committed and tested it, and found that it didn't work correctly since the
acceptance suite runs `acceptance/**/*.rb` unconditionally.

I then fixed that up by moving things around, staged those changes, tested,
and submitted my pull request.  Yes - without actually *committing* the fixed
version, but with testing the checked out (and functional) version.

Lesson learned: I should update my pull request making tooling to check for a
dirty repository, or staged but uncommitted changes, and abort the pull
request.  If it isn't clean, it isn't ready to be a pull request.

This fixes that by pushing the fixed and functional version into place.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Fix for failed merge of #410 - add the missing commit

The pull request for #410 was missing a commit that actually made it work,
which is very embarrassing.  This corrects that by adding it in.