Skip to content
Browse files

Added new README

better grouping using contexts with unit tests
  • Loading branch information...
1 parent 3b88a5a commit b1b36c1f3907da4b06ba2fd68d598d731a685a83 @lynxbat lynxbat committed Jan 24, 2012
Showing with 49 additions and 38 deletions.
  1. +1 −0 images/README
  2. +1 −3 install/README
  3. +0 −3 lib/common/rz_persist_controller.rb
  4. +1 −0 test_scripts/README
  5. +46 −32 unit_tests/rz_persist_spec.rb
View
1 images/README
@@ -0,0 +1 @@
+This is the default Razor images folder. If no environment variable is set for RAZOR_IMAGES_PATH then this is used by default.
View
4 install/README
@@ -1,5 +1,3 @@
*these README's are placeholders for RI docs
-The install dir is where all bits/files needed for installing Razor will exist
-
-
+The install dir is where all bits/files needed for installing Razor will exist
View
3 lib/common/rz_persist_controller.rb
@@ -8,12 +8,9 @@ class RzPersistController
attr_accessor :persist_obj
# @param config [RZConfiguration]
def initialize(config)
-
-
# init correct database object
if (config.persist_mode = :mongo)
@persist_obj = RzPersistMongo.new
end
-
end
end
View
1 test_scripts/README
@@ -0,0 +1 @@
+This folder will hold build/testing scripts used for dev purposes
View
78 unit_tests/rz_persist_spec.rb
@@ -2,40 +2,54 @@
require "../lib/common/rz_configuration"
require "../lib/common/rz_persist_controller"
-describe "RzPersistController" do
+describe RzPersistController do
+
+ describe ".init" do
+ it "should create a PersistMongo object for .persist_obj if config persist_mode is :mongo" do
+ config = RZConfiguration.new
+ config.persist_mode = :mongo
+ persist = RzPersistController.new(config)
+ persist.persist_obj.class.should == RzPersistMongo
+ end
+ end
+
+ describe ".Model" do
+ it "should add a Model to the Model collection"
+ it "should read a Model from the Model collection"
+ it "should return a array of Models from the Model collection"
+ it "should remove a Model from the Model collection"
+ it "should update an existing Model in the Model collection"
+ end
- it "should create a PersistMongo object for .persist_obj if config persist_mode is :mongo" do
- config = RZConfiguration.new
- config.persist_mode = :mongo
- persist = RzPersistController.new(config)
- persist.persist_obj.class.should == RzPersistMongo
+ describe ".Policy" do
+ it "should add a Policy to the Policy collection"
+ it "should read a Policy from the Policy collection"
+ it "should return a array of Policy from the Policy collection"
+ it "should remove a Policy from the Policy collection"
+ it "should update an existing Policy in the Policy collection"
end
- it "should add a Model to the Model collection"
- it "should read a Model from the Model collection"
- it "should return a array of Models from the Model collection"
- it "should remove a Model from the Model collection"
- it "should update an existing Model in the Model collection"
-
- it "should add a Policy to the Policy collection"
- it "should read a Policy from the Policy collection"
- it "should return a array of Policy from the Policy collection"
- it "should remove a Policy from the Policy collection"
- it "should update an existing Policy in the Policy collection"
-
- it "should read the LastState of a specific node"
- it "should set the LastState of a specific node"
- it "should get an array of nodes of a specific LastState"
- it "should get an array of all nodes LastState"
-
- it "should read the CurrentState of a specific node"
- it "should set the CurrentState of a specific node"
- it "should get an array of nodes of a specific CurrentState"
- it "should get an array of all nodes CurrentState"
-
- it "should read the NextState of a specific node"
- it "should set the NextState of a specific node"
- it "should get an array of nodes of a specific NextState"
- it "should get an array of all nodes NextState"
+ describe ".State" do
+ describe ".LastState" do
+ it "should read the LastState of a specific node"
+ it "should set the LastState of a specific node"
+ it "should get an array of nodes of a specific LastState"
+ it "should get an array of all nodes LastState"
+ end
+
+ describe ".CurrentState" do
+ it "should read the CurrentState of a specific node"
+ it "should set the CurrentState of a specific node"
+ it "should get an array of nodes of a specific CurrentState"
+ it "should get an array of all nodes CurrentState"
+ end
+
+ describe ".NextState" do
+ it "should read the NextState of a specific node"
+ it "should set the NextState of a specific node"
+ it "should get an array of nodes of a specific NextState"
+ it "should get an array of all nodes NextState"
+ end
+ end
end

0 comments on commit b1b36c1

Please sign in to comment.
Something went wrong with that request. Please try again.