incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [40/50] [abbrv] Initial Blur Console commit.
Date Fri, 17 May 2013 03:25:07 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/controllers/users_controller_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/controllers/users_controller_spec.rb b/blur-admin/spec/controllers/users_controller_spec.rb
deleted file mode 100644
index 6bdabc3..0000000
--- a/blur-admin/spec/controllers/users_controller_spec.rb
+++ /dev/null
@@ -1,178 +0,0 @@
-require 'spec_helper'
-
-describe UsersController do
-  describe "actions" do
-    before(:each) do
-      #Universal Setup
-      setup_tests
-
-      User.stub(:find).and_return @user
-    end
-
-    describe "GET index" do
-      it "should render index template" do
-        get :index
-        response.should render_template(:index)
-      end
-    end
-
-    describe "GET show" do
-      before(:each) do
-        @table = FactoryGirl.create_list :blur_table, 3
-        @user.stub(:saved_cols)
-        BlurTable.stub(:all).and_return(@table)
-      end
-
-      it "should find and assign user" do
-        User.should_receive(:find).with('id').and_return(@user)
-        get :show, :id => 'id'
-        assigns(:user).should == @user
-      end
-
-      it "should find and assign preferences" do
-        @user.should_receive(:column_preference).at_least(1).times
-        @user.should_receive(:zookeeper_preference).at_least(1).times
-        get :show, :id => 'id'
-        assigns(:column_preference).should == @user.column_preference
-        assigns(:zookeeper_preference).should == @user.zookeeper_preference
-      end
-
-      it "should find and create a list of all the table choices" do
-        get :show, :id => 'id'
-        assigns(:choices).should == ['ColumnFamily1', 'ColumnFamily2', 'ColumnFamily3']
-      end
-
-      it "should render show template" do
-        get :show, :id => 'id'
-        response.should render_template(:show)
-      end
-    end
-
-    describe "GET new" do
-      let(:user) { mock_model(User).as_null_object }
-
-      it "should create a new user" do
-        User.should_receive(:new).at_least(1).times.and_return(user)
-        get :new
-      end
-
-      it "should render new layout" do
-        get :new
-        response.should render_template(:new)
-      end
-    end
-
-
-    describe "POST create" do
-      before(:each) do
-        User.stub(:new).and_return(@user)
-        @valid_user = {
-          'username' => 'bob',
-          'email' => 'bob@example.com',
-          'password' => 'password',
-          'password_confirmation' => 'password'
-        }
-      end
-
-      it "creates a new user" do
-        User.should_receive(:new).with(@valid_user).and_return(@user)
-        post :create, :user => @valid_user
-      end
-
-      context "when the message saves successfully" do
-        it "redirects to the users path when it can? index users" do
-          @user.stub!(:save).and_return(true)
-          post :create
-          response.should redirect_to(users_path)
-        end
-
-        it "redirects to the user's page when it cannot? index users" do
-          @user.stub!(:save).and_return(true)
-          controller.stub!(:can?).and_return(false)
-          post :create
-          response.should redirect_to(@user)
-        end
-      end
-
-      context "when the message saves unsuccessfully" do
-        it "renders the new template" do
-          @user.stub!(:save).and_return(false)
-          post :create
-          response.should render_template(:new)
-        end
-      end
-    end
-
-    describe "GET edit" do
-      it "should find and assign the user" do
-        User.should_receive(:find).with('id').and_return(@user)
-        get :edit, :id => 'id'
-        assigns(:user).should == @user
-      end
-
-      it "should render the edit template" do
-        get :edit, :id => 'id'
-        response.should render_template(:edit)
-      end
-    end
-
-    describe "PUT update" do
-      it "should find and assign the user" do
-        User.should_receive(:find).with(@user.id.to_s)
-        put :update, :id => @user.id, :user => {:name => 'Bob'}
-        assigns(:user).should == @user
-      end
-
-      context "When updating the attributes succeeds" do
-        before(:each) do
-          @user.stub!(:update_attributes).and_return true
-        end
-
-        it "should redirect to the admin page and include notice when admin updates a user" do
-          controller.stub!(:can?).and_return(false)
-          put :update, :id => @user.id, :user => {:name => 'Bob'}
-          response.should redirect_to(@user)
-          flash[:notice].should_not be_blank
-        end
-
-        it "should redirect to the user and include notice when user updates himself" do
-          controller.stub!(:can?).and_return(true)
-          put :update, :id => @user.id, :user => {:name => 'Bob'}
-          response.should redirect_to users_path
-          flash[:notice].should_not be_blank
-        end
-      end
-
-      context "When updating the attributes fails" do
-        it "should render the edit template when update fails" do
-          @user.stub!(:update_attributes).and_return(false)
-          put :update, :id => @user.id, :user => {:name => 'Bob'}
-          response.should render_template(:edit)
-        end
-      end
-
-      it "should log an audit event" do
-        Audit.should_receive :log_event
-        put :update, :id => @user.id, :user => {:name => 'Bob'}
-      end
-    end
-
-    describe "DELETE destroy" do
-      it "should find and destroy the user" do
-        @user.should_receive(:destroy)
-        delete :destroy, :id => @user.id
-      end
-
-      it "should redirect to the users_path" do
-        delete :destroy, :id => @user.id
-        response.should redirect_to(users_path)
-      end
-
-      it "should log an audit event" do
-        Audit.should_receive :log_event
-        delete :destroy, :id => @user.id
-      end
-
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/controllers/zookeepers_controller_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/controllers/zookeepers_controller_spec.rb b/blur-admin/spec/controllers/zookeepers_controller_spec.rb
deleted file mode 100644
index d84a875..0000000
--- a/blur-admin/spec/controllers/zookeepers_controller_spec.rb
+++ /dev/null
@@ -1,78 +0,0 @@
-require 'spec_helper'
-
-describe ZookeepersController do
-  describe "actions" do
-    before do
-      # Universal setup
-      setup_tests
-
-      # Set up association chain
-      @zookeeper  = FactoryGirl.create :zookeeper
-      Zookeeper.stub!(:find).and_return @zookeeper
-    end
-
-    describe 'GET index' do
-      it "renders the index template" do
-        get :index, :format => :html
-        response.should render_template 'index'
-      end
-
-      it "should set the zookeeper when there is only one zookeeper" do
-        Zookeeper.stub!(:count).and_return 1
-        Zookeeper.stub!(:first).and_return @zookeeper
-        controller.stub!(:set_zookeeper_with_preference)
-        controller.should_receive(:set_zookeeper).with(@zookeeper.id)
-        get :index, :format => :html
-      end
-    end
-
-    describe 'GET show' do
-      it "renders the show_current view" do
-        get :show, :id => @zookeeper.id, :format => :html
-        response.should render_template :show
-      end
-
-      it "renders json when the format is json" do
-        get :show, :id => @zookeeper.id, :format => :json
-        response.body.should == @zookeeper.to_json(:methods => [:clusters, :blur_controllers])
-      end
-    end
-
-    describe 'GET long running queries' do
-      before :each do
-        @zookeeper.stub!(:long_running_queries)
-      end
-
-      it "it grabs the long_running_queries and renders a json object" do
-        @zookeeper.should_receive :long_running_queries
-        get :long_running_queries, :id => @zookeeper.id, :format => :json
-        response.content_type.should == 'application/json'
-      end
-    end
-    describe 'destroy zookeeper' do
-      before do
-        @zookeeper.stub!(:destroy)
-      end
-
-      it "destroys the zookeeper" do
-        @zookeeper.should_receive(:destroy)
-        @zookeeper.stub!(:zookeeper_status).and_return 0
-        delete :destroy, :id => @zookeeper.id, :format => :json
-      end
-
-      it "errors when the zookeeper is enabled" do
-        expect {
-          @zookeeper.stub!(:zookeeper_status).and_return 1
-          delete :destroy, :id => @zookeeper.id, :format => :json
-        }.to raise_error
-      end
-
-      it "logs the event when the zookeeper is deleted" do
-        @zookeeper.stub!(:zookeeper_status).and_return 0
-        @zookeeper.stub!(:destroyed?).and_return true
-        Audit.should_receive :log_event
-        delete :destroy, :id => @zookeeper.id, :format => :json
-      end
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/factories/admin_setting.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/factories/admin_setting.rb b/blur-admin/spec/factories/admin_setting.rb
deleted file mode 100644
index 8a1cdc4..0000000
--- a/blur-admin/spec/factories/admin_setting.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# Read about factories at https://github.com/thoughtbot/factory_girl
-
-FactoryGirl.define do
-  factory :admin_setting do
-    setting 'regex'
-    value   '.*'
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/factories/audits.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/factories/audits.rb b/blur-admin/spec/factories/audits.rb
deleted file mode 100644
index e89f1ab..0000000
--- a/blur-admin/spec/factories/audits.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# Read about factories at https://github.com/thoughtbot/factory_girl
-
-FactoryGirl.define do
-  factory :audit do
-    user            { FactoryGirl.create :user }
-    mutation        1
-    model_affected  1
-    action          "This is an action"
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/factories/blur_controller.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/factories/blur_controller.rb b/blur-admin/spec/factories/blur_controller.rb
deleted file mode 100644
index 6e0b15f..0000000
--- a/blur-admin/spec/factories/blur_controller.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-FactoryGirl.define do
-  factory :blur_controller do
-    sequence (:node_name)     { |n| "Test Node ##{n}" }
-    controller_status                    { rand 3 }
-    blur_version              { "1.#{rand 10}.#{rand 10}" }
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/factories/blur_queries.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/factories/blur_queries.rb b/blur-admin/spec/factories/blur_queries.rb
deleted file mode 100644
index 3731468..0000000
--- a/blur-admin/spec/factories/blur_queries.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-FactoryGirl.define do
-  factory :blur_query do
-    sequence(:query_string) {|n| "Blur Query ##{n} Query String"}
-    complete_shards         { rand 6 }
-    uuid                    { rand 10 ** 8 }
-    super_query_on          { true } # 75% chance
-    start                   { rand 10 ** 6 }
-    fetch_num               { rand 10 ** 6 }
-    userid                  { "Test User ##{rand 20}" }
-    times                   {{'shard' => { :cpuTime => 40, :realTime => 56, :setCpuTime => true, :setRealTime => true }}.to_json}
-    total_shards            { 5 }
-    state                   { rand 3 }
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/factories/blur_tables.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/factories/blur_tables.rb b/blur-admin/spec/factories/blur_tables.rb
deleted file mode 100644
index 08702d6..0000000
--- a/blur-admin/spec/factories/blur_tables.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-FactoryGirl.define do
-  factory :blur_table do
-    sequence(:table_name) { |n| "Test Blur Table ##{n}" }
-    current_size          { 10**12 + rand(999 * 10 ** 12) } #Between a terrabyte and a petabyte
-    query_usage           { rand 500 }                      #Queries per second
-    query_count           { rand 10 }
-    record_count          { 10**6 + rand(999 * 10 ** 6) }   #Between a million and a billion 
-    row_count             { 10**6 + rand(999 * 10 ** 6) }   #Between a million and a billion 
-    table_status                { 1 + rand(2) }
-    sequence(:table_uri)  { |n| "blur_table#{n}.blur.example.com" }
-    table_analyzer        'standard.table_analyzer'
-    comments              'comment'
-    cluster               { FactoryGirl.create(:cluster) }
-    table_schema          {[
-                            {
-                              "name" => 'ColumnFamily1',
-                              "columns" => [
-                                {"name" => 'Column1A'},
-                                {"name" => 'Column1B'},
-                                {"name" => 'Column1C'}
-                              ]
-                            },
-                            {
-                              "name" => 'ColumnFamily2',
-                              "columns" => [
-                                {"name" => 'Column2A'},
-                                {"name" => 'Column2B'},
-                                {"name" => 'Column2C'}
-                              ]
-                            },
-                            {
-                              "name" => 'ColumnFamily3',
-                              "columns" => [
-                                {"name" => 'Column3A'},
-                                {"name" => 'Column3B'},
-                                {"name" => 'Column3C'}
-                              ]
-                            }
-                          ].to_json}
-    server                {{  'Host1:101' => %w[shard-001 shard-002 shard-003],
-                              'Host2:102' => %w[shard-004 shard-005 shard-006]}.to_json}
-    ignore do
-      recursive_factor 3
-    end
-
-    factory :blur_table_with_blur_query do
-      after_create do |blur_table|
-        FactoryGirl.create_list(:blur_query, 1, :blur_table => blur_table)
-      end
-    end
-
-    factory :blur_table_with_blur_queries do
-      after_create do |blur_table, evaluator|
-        FactoryGirl.create_list(:blur_query, evaluator.recursive_factor, :blur_table => blur_table)
-      end
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/factories/cluster.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/factories/cluster.rb b/blur-admin/spec/factories/cluster.rb
deleted file mode 100644
index 36128da..0000000
--- a/blur-admin/spec/factories/cluster.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-FactoryGirl.define do
-  factory :cluster do
-    sequence(:name)  { |n| "Test Cluster ##{n}" }
-    safe_mode        false
-    zookeeper_id     1
-    can_update       false
-
-    ignore do
-      recursive_factor 3
-    end
-
-    factory :cluster_with_shard do
-      after_create do |cluster|
-        FactoryGirl.create_list(:blur_shard, 1, :cluster => cluster)
-      end
-    end
-
-    factory :cluster_with_shards do
-      after_create do |cluster|
-        FactoryGirl.create_list(:blur_shard, 3, :cluster => cluster)
-      end
-    end
-
-    factory :cluster_with_shards_online do
-      after_create do |cluster|
-        FactoryGirl.create_list(:blur_shard, 3, :cluster => cluster, :shard_status => 1)
-      end
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/factories/hdfs.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/factories/hdfs.rb b/blur-admin/spec/factories/hdfs.rb
deleted file mode 100644
index 1f8e4af..0000000
--- a/blur-admin/spec/factories/hdfs.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-FactoryGirl.define do
-  factory :hdfs do
-    host { "nic-factory-hdfs.com" }
-    port { "9000" }
-    name { "factory_hdfs" }
-
-    ignore do
-      recursive_factor 3
-    end
-
-    factory :hdfs_with_stats do
-      after_create do |hdfs, evaluator|
-        FactoryGirl.create_list(:hdfs_stat, evaluator.recursive_factor, :hdfs => hdfs)
-      end
-    end
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/factories/hdfs_stat.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/factories/hdfs_stat.rb b/blur-admin/spec/factories/hdfs_stat.rb
deleted file mode 100644
index cf0be9f..0000000
--- a/blur-admin/spec/factories/hdfs_stat.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-FactoryGirl.define do
-  factory :hdfs_stat do
-    config_capacity       { 100000 + rand(10000) }
-    present_capacity      { config_capacity - rand(50000) }
-    dfs_used_real         { rand 50000 }
-    dfs_used_logical      { rand 50000 }
-    dfs_remaining         { present_capacity - dfs_used_real }
-    dfs_used_percent      { (present_capacity - dfs_used_real) / present_capacity }
-    under_replicated      { rand 5 }
-    corrupt_blocks        { rand 5 }
-    missing_blocks        { rand 5 }
-    total_nodes           { rand 5 }
-    dead_nodes            { rand 5 }
-    sequence(:created_at, 0) {|n| ((n % 3) + 0.9).minute.ago }
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/factories/license.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/factories/license.rb b/blur-admin/spec/factories/license.rb
deleted file mode 100644
index dd4c727..0000000
--- a/blur-admin/spec/factories/license.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-FactoryGirl.define do
-  factory :license do
-    org             'NIC'
-    expires_date    { Date.today.months_ago(-2) }
-    issued_date     { Date.today.months_ago(6) }
-    node_overage    { 0 }
-    cluster_overage { 0 }
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/factories/preference.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/factories/preference.rb b/blur-admin/spec/factories/preference.rb
deleted file mode 100644
index 877418b..0000000
--- a/blur-admin/spec/factories/preference.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-FactoryGirl.define do
-  factory :preference do
-    name      'column'
-    pref_type 'column'
-    value     ['ColumnFamily']
-  end
-
-  factory :zookeeper_pref, class:Preference do
-    name      '1'
-    pref_type 'zookeeper'
-    value     '1'
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/factories/search.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/factories/search.rb b/blur-admin/spec/factories/search.rb
deleted file mode 100644
index 53673cf..0000000
--- a/blur-admin/spec/factories/search.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-FactoryGirl.define do
-  factory :search do
-    super_query     { rand(1) == 0 } # 50% chance
-    columns         { ["family_-sep-_ColumnFamily1", 
-                       "column_-sep-_ColumnFamily2_-sep-_Column2A",
-                       "column_-sep-_ColumnFamily2_-sep-_Column2B",
-                       "column_-sep-_ColumnFamily3_-sep-_Column3C"].to_json }
-    fetch           { rand 10 ** 6 }
-    offset          { rand 1 ** 5 }
-    sequence(:name) {|n| "Search #{n}"}
-    query           "employee.name:bob"
-    blur_table_id   { rand 10 ** 6 }
-    user_id         { rand 10 ** 6 }
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/factories/shard.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/factories/shard.rb b/blur-admin/spec/factories/shard.rb
deleted file mode 100644
index 965d3fe..0000000
--- a/blur-admin/spec/factories/shard.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-FactoryGirl.define do
-  factory :blur_shard do
-    blur_version              { "1.#{rand 10}.#{rand 10}" }
-    sequence (:node_name)     { |n| "Test Node ##{n}" }
-    shard_status                    { rand 3 }
-    
-    factory :shard_with_cluster do
-      after_create do |blur_shard|
-        FactoryGirl.create_list(:cluster, 1, :blur_shards => [blur_shard])
-      end
-    end
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/factories/users.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/factories/users.rb b/blur-admin/spec/factories/users.rb
deleted file mode 100644
index 86d43fb..0000000
--- a/blur-admin/spec/factories/users.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-FactoryGirl.define do
-	factory :user do
-		sequence(:username)  	{|n| "user#{n}"}
-		sequence(:name)      	{|n| "user#{n}"}
-		sequence (:email)     {|n| "user#{n}@example.com"}
-		password              "password"
-		password_confirmation "password"
-		roles                 {['editor', 'admin', 'reader', 'auditor', 'searcher']}
-
-    factory :user_with_preferences do
-      after_create do |user|
-        FactoryGirl.create(:preference, :user => user)
-        FactoryGirl.create(:zookeeper_pref, :user =>user)
-      end
-    end
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/factories/zookeeper.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/factories/zookeeper.rb b/blur-admin/spec/factories/zookeeper.rb
deleted file mode 100644
index d9f27c2..0000000
--- a/blur-admin/spec/factories/zookeeper.rb
+++ /dev/null
@@ -1,53 +0,0 @@
-FactoryGirl.define do
-  factory :zookeeper do
-    sequence (:name)      { |n| "Test Zookeeper ##{n}" }
-    sequence (:url)       { |n| "zookeeper#{n}.blur.example.com" }
-    sequence (:blur_urls) { |n| "host#{n}:40010"}
-    online_ensemble_nodes { "[\"nic-blurtop.nearinfinity.com\"]" }
-    zookeeper_status                { rand 2 }
-
-    ignore do
-      recursive_factor 3
-    end
-
-    factory :zookeeper_with_cluster do
-      after_create do |zookeeper|
-        FactoryGirl.create_list(:blur_controller, 1, :zookeeper => zookeeper)
-        FactoryGirl.create_list(:cluster, 1, :zookeeper => zookeeper)
-      end
-    end
-
-    factory :zookeeper_with_clusters do
-      after_create do |zookeeper, evaluator|
-        FactoryGirl.create_list(:blur_controller, evaluator.recursive_factor, :zookeeper => zookeeper)
-        FactoryGirl.create_list(:cluster, evaluator.recursive_factor, :zookeeper => zookeeper)
-      end
-    end
-
-    factory :zookeeper_with_blur_table, :parent => :zookeeper_with_cluster do
-      after_create do |zookeeper|
-        zookeeper.clusters.each { |cluster| FactoryGirl.create(:blur_table, :cluster => cluster) }
-        zookeeper.clusters.each { |cluster| FactoryGirl.create(:blur_shard, :cluster => cluster) }
-      end
-    end
-
-    factory :zookeeper_with_blur_tables, :parent => :zookeeper_with_cluster do
-      after_create do |zookeeper, evaluator|
-        zookeeper.clusters.each { |cluster| FactoryGirl.create_list(:blur_table, evaluator.recursive_factor, :cluster => cluster) }
-        zookeeper.clusters.each { |cluster| FactoryGirl.create_list(:blur_shard, evaluator.recursive_factor, :cluster => cluster) }
-      end
-    end
-
-    factory :zookeeper_with_blur_query, :parent => :zookeeper_with_blur_table do
-      after_create do |zookeeper|
-        zookeeper.blur_tables.each { |blur_table| FactoryGirl.create(:blur_query, :blur_table => blur_table) }
-      end
-    end
-
-    factory :zookeeper_with_blur_queries, :parent => :zookeeper_with_blur_tables do
-      after_create do |zookeeper, evaluator|
-        zookeeper.blur_tables.each { |blur_table| FactoryGirl.create_list(:blur_query, evaluator.recursive_factor, :blur_table => blur_table) }
-      end
-    end
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/fixtures/test.png
----------------------------------------------------------------------
diff --git a/blur-admin/spec/fixtures/test.png b/blur-admin/spec/fixtures/test.png
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/helpers/application_helper_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/helpers/application_helper_spec.rb b/blur-admin/spec/helpers/application_helper_spec.rb
deleted file mode 100644
index 9d4c8cc..0000000
--- a/blur-admin/spec/helpers/application_helper_spec.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-require 'spec_helper'
-describe ApplicationHelper do  
-  describe "pluralize without count" do
-    it "returns the singular if given a 1 or '1'" do 
-      pluralize_no_count(1, 'rail').should == 'rail'
-      pluralize_no_count('1', 'rail').should == 'rail'
-    end
-
-    it 'should return the system defined plural if given a numbe larger than 1' do
-      pluralize_no_count(2, 'rail').should == 'rails'
-    end
-
-    it 'should return the given plural if given a numbe larger than 1' do
-      pluralize_no_count(2, 'rail', 'not rail').should == 'not rail'
-    end
-  end
-
-  describe "stateful nav url" do
-    it "should return an empty string if there isnt a current zookeeper" do
-      session[:current_zookeeper_id] = nil
-      stateful_nav_url('page').should == ""
-    end
-
-    it "should return an empty string if given page isnt stateful" do
-      session[:current_zookeeper_id] = 1
-      stateful_nav_url('page').should == ""
-    end
-
-    it "given a valid stateful page should return the correct page" do
-      session[:current_zookeeper_id] = 1
-      stateful_nav_url('environment').should == zookeeper_path(1)
-      stateful_nav_url('blur_table').should == zookeeper_blur_tables_path(1)
-      stateful_nav_url('blur_query').should == zookeeper_blur_queries_path(1)
-      stateful_nav_url('search').should == zookeeper_searches_path(1)
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/helpers/blur_queries_helper_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/helpers/blur_queries_helper_spec.rb b/blur-admin/spec/helpers/blur_queries_helper_spec.rb
deleted file mode 100644
index ba11dbe..0000000
--- a/blur-admin/spec/helpers/blur_queries_helper_spec.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-require 'spec_helper'
-describe BlurQueryHelper do
-  describe "format title" do
-    it "returns the nothing when it is less than 20 chars" do
-      format_title("Simple").should == ''
-    end
-
-    it "returns a string with the ' +' with a line break" do
-      format_title("Not Very Simple +And Kind Of Long").should == "Not Very Simple<br />+And Kind Of Long"
-    end
-  end
-
-  describe "print value" do
-    it "returns the default message when given conditional evaluates to false" do 
-      print_value(false).should == 'Not Available'
-    end
-
-    it "returns the conditional when no block is given" do 
-      print_value('hello').should == 'hello'
-    end
-
-    it "executes the block when the conditional is false" do 
-      print_value(true){'hello'}.should == 'hello'
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/helpers/license_helper_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/helpers/license_helper_spec.rb b/blur-admin/spec/helpers/license_helper_spec.rb
deleted file mode 100644
index 9200c4d..0000000
--- a/blur-admin/spec/helpers/license_helper_spec.rb
+++ /dev/null
@@ -1,92 +0,0 @@
-require 'spec_helper'
-include ApplicationHelper
-
-describe LicenseHelper do
-  before(:each) do
-    @license = FactoryGirl.create :license
-  end
-  describe "license text" do
-    before(:each) do
-      @prefix = "Licensed to: NIC on #{@license.issued_date.strftime('%d %b %Y')}."
-    end
-
-    describe 'License expiration' do
-      it 'should state no warning when the license will expire in more than 30 days' do
-        license_text(@license).should == @prefix
-      end
-
-      it 'should return No license found when the license is nil' do
-        license_text(nil).should == 'No valid license found.'
-      end
-
-      it 'should state that the license is expired when the number of days left is less than 0' do
-        @license.stub!(:expires_date).and_return Date.today.months_ago(1)
-        license_text(@license).should == @prefix + ' License is expired.'
-      end
-
-      it 'should state that the license is about to expire today when the number of days left is 0' do
-        @license.stub!(:expires_date).and_return Date.today
-        license_text(@license).should == @prefix + ' License expires today.'
-      end
-
-      it 'should state that the license will expire in x days when the number of days left is x and x is less than 30' do
-        @license.stub!(:expires_date).and_return Date.today.weeks_ago(-1)
-        license_text(@license).should == @prefix + ' License expires in 7 days.'
-      end
-    end
-
-    describe 'Node Overage' do
-      before(:each) do
-        @license.stub!(:node_overage).and_return 1
-      end
-
-      it 'should warn that you have a node overage and if you are over teh grace period then tell you to contact nic' do
-        @license.stub!(:grace_period_days_remain).and_return -2
-        license_text(@license).should == @prefix + ' There is currently 1 node over the licensed amount. Please contact Near Infinity to upgrade the license.'
-      end
-
-      it 'should warn that you have a node overage and get the correct pluralization' do
-        @license.stub!(:node_overage).and_return 2
-        @license.stub!(:grace_period_days_remain).and_return -2
-        license_text(@license).should == @prefix + ' There are currently 2 nodes over the licensed amount. Please contact Near Infinity to upgrade the license.'
-      end
-
-      it 'should warn that you have a node overage and if you are within the grace period then it should tell you how many days are left' do
-        @license.stub!(:grace_period_days_remain).and_return 3
-        license_text(@license).should == @prefix + ' There is currently 1 node over the licensed amount. 3 days left until a new license is needed.'
-      end
-    end
-
-    describe 'cluster overage' do
-      it 'should warn of a cluster overage if there are any clusters that have expired' do
-        @license.stub!(:cluster_overage).and_return 1
-        license_text(@license).should == @prefix + ' There is currently 1 cluster over the licensed amount. Please contact Near Infinity to upgrade the license.'
-      end
-
-      it 'should warn of a cluster overage if there are any clusters that have expired with correct pluralization' do
-        @license.stub!(:cluster_overage).and_return 2
-        license_text(@license).should == @prefix + ' There are currently 2 clusters over the licensed amount. Please contact Near Infinity to upgrade the license.'
-      end
-    end
-  end
-
-  describe "footer class" do
-    it 'should return false if the license is fine' do
-      footer_class(@license).should == false
-    end
-
-    it 'should return expiring_license if the license is nil' do
-      footer_class(nil).should == 'expiring_license'
-    end
-
-    it 'should return expiring_license if it is within 30 days of expiring or has expired, or if there is a cluster overage' do 
-      @license.stub!(:expires_date).and_return Date.today.weeks_ago(-1)
-      footer_class(@license).should == 'expiring_license'
-    end
-
-    it 'should return expiring_license if there is a cluster overage' do 
-      @license.stub!(:cluster_overage).and_return 1
-      footer_class(@license).should == 'expiring_license'
-    end
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/models/ability_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/models/ability_spec.rb b/blur-admin/spec/models/ability_spec.rb
deleted file mode 100644
index 08973b0..0000000
--- a/blur-admin/spec/models/ability_spec.rb
+++ /dev/null
@@ -1,286 +0,0 @@
-require "spec_helper"
-
-def controller_actions
-  # this method returns a hash of controllers each with an array of their respective
-  # actions.  Use this list to make sure unauthorized users are not able to access any
-  # actions in a controller.  Note that the action_methods also includes some callbacks,
-  # so this list cannot be used for determining that a user *can* do all of the actions
-  # in a controller (use cancan 2.0's 'access' for that).
-  
-  Dir[File.join Rails.root, 'app', 'controllers', '*'].each {|file| load file}
-  @controller_actions ||= ApplicationController.subclasses.reduce({}) do |memo, controller|
-    memo[controller.to_s.gsub("Controller", "").underscore.to_sym] = 
-      controller.action_methods.collect {|method| method.to_sym}
-    memo
-  end
-end
-
-describe Ability do
-  describe "when not logged in" do
-    before(:each) do
-      @ability = Ability.new(nil)
-    end
-
-    it "can create a user (register) with username, email, password" do
-      @ability.should be_able_to :new,    :users
-      @ability.should be_able_to :create, :users, :username
-      @ability.should be_able_to :create, :users, :name
-      @ability.should be_able_to :create, :users, :email
-      @ability.should be_able_to :create, :users, :password
-      @ability.should be_able_to :create, :users, :password_confirmation
-    end
-
-    it "can not create a user (register) with roles" do
-      User::ROLES.each do |role|
-        @ability.should_not be_able_to :create, :users, role
-      end
-    end
-
-    it "can create a session (log in)" do
-      @ability.should be_able_to :create, :user_sessions 
-      @ability.should be_able_to :new, :user_sessions
-    end
-
-    it "can not access pages" do
-      # actions are automatically added to this check.  Thus, you have to specifically
-      # filter actions that should be available to non logged-in users
-
-      @actions = controller_actions
-
-      #filter out actions available to non logged in users
-      @actions[:user_sessions] -= [:create, :new]
-      @actions[:users]         -= [:new, :create]
-      @actions[:errors]        -= [:error_404, :error_422, :error_500]
-
-      @actions.each do |controller, actions|
-        actions.each {|action| @ability.should_not be_able_to action, controller}
-      end
-
-    end
-  end
-
-  describe "when a user with no roles" do
-    before(:each) do
-      @user = FactoryGirl.create :user, :roles => []
-      @ability = Ability.new @user
-    end
-
-    it "can view, edit and delete itself" do
-      @ability.should be_able_to :show, @user
-      @ability.should be_able_to :edit, @user
-      @ability.should be_able_to :destroy, @user
-    end
-
-    it "can log out" do
-      @ability.should be_able_to :destroy, :user_sessions
-    end
-
-    it "can update own username, email, and password" do
-      @ability.should be_able_to :update, @user, :username
-      @ability.should be_able_to :update, @user, :name
-      @ability.should be_able_to :update, @user, :email
-      @ability.should be_able_to :update, @user, :password
-      @ability.should be_able_to :update, @user, :password_confirmation
-   end
-
-    it "can not view, edit, update, or delete other users" do
-      other_user = User.new
-      @ability.should_not be_able_to :show, other_user
-      @ability.should_not be_able_to :edit, other_user
-      @ability.should_not be_able_to :update, other_user
-      @ability.should_not be_able_to :destroy, other_user
-    end
-
-    it "can not update own roles" do
-      @ability.should_not be_able_to :update, @user, :admin
-      @ability.should_not be_able_to :update, @user, :editor 
-    end
-
-    it "can not view query_strings on blur_query page" do
-      @ability.should_not be_able_to :index, :blur_queries, :query_string
-    end
-
-    it "can not access pages" do
-      # actions are automatically added to this check.  Thus, you have to specifically
-      # filter actions that should be available to non logged-in users.
-      # NOTE:  These are just the vanilla actions, so if the action depends on what
-      # attribute is being updated, or what value an attribute is (i.e. checking to 
-      # make sure updated object is the user's) it will pass, so those cases must be
-      # tested seperately.
-
-      @actions = controller_actions
-
-      #filter out actions available to non logged in users
-      @actions[:users] -= [:show, :edit, :destroy, :update]
-      @actions[:user_sessions] -= [:destroy]
-      @actions[:errors]        -= [:error_404, :error_422, :error_500]
-
-
-      @actions.each do |controller, actions|
-        actions.each {|action| @ability.should_not be_able_to action, controller}
-      end
-
-    end
-
-  end
-
-  describe "when a reader" do
-    before(:each) do
-      @user = FactoryGirl.create :user, :roles => ['reader']
-      @ability = Ability.new @user
-    end
-
-    it "can view pages" do
-      @ability.should be_able_to :index, :blur_tables
-      @ability.should be_able_to :index, :zookeepers
-      @ability.should be_able_to :index, :blur_queries
-      @ability.should be_able_to :index, :hdfs
-      @ability.should be_able_to :index, :hdfs_metrics
-      @ability.should be_able_to :show, :blur_queries
-      @ability.should be_able_to :show, :clusters
-      @ability.should be_able_to :help, :application
-    end
-
-    it "can gather information" do
-      @ability.should be_able_to :long_running_queries, :zookeepers
-      @ability.should be_able_to :expand, :hdfs
-      @ability.should be_able_to :file_info, :hdfs
-      @ability.should be_able_to :folder_info, :hdfs
-      @ability.should be_able_to :slow_folder_info, :hdfs
-      @ability.should be_able_to :file_tree, :hdfs
-      @ability.should be_able_to :stats, :hdfs_metrics
-      @ability.should be_able_to :refresh, :blur_queries
-      @ability.should be_able_to :terms, :blur_tables
-    end
-
-    it "can not view query strings" do
-      @ability.should_not be_able_to :show, :blur_queries, :query_string
-      @ability.should_not be_able_to :index, :blur_queries, :query_string
-    end
-
-    it "can not change own column preferences" do
-      @preference = FactoryGirl.create :preference, :user_id => @user.id, :pref_type => 'column'
-      @ability.should_not be_able_to :update, @preference
-    end
-
-    it "can not change own zookeeper preference" do
-      @preference = FactoryGirl.create :preference, :user_id => @user.id, :pref_type => 'zookeeper'
-      @ability.should_not be_able_to :update, @preference
-    end
-
-  end
-
-  describe "when an editor" do
-    before(:each) do
-      @user = FactoryGirl.create :user, :roles => ['editor']
-      @ability = Ability.new @user
-    end
-  
-    it "can enable, disable, comment, and delete tables" do
-      @ability.should be_able_to :enable, :blur_tables
-      @ability.should be_able_to :disable, :blur_tables
-      @ability.should be_able_to :destroy, :blur_tables
-      @ability.should be_able_to :comment, :blur_tables
-    end
-
-    it "can cancel queries" do
-      @ability.should be_able_to :cancel, :blur_queries
-    end
-
-    it "can index shards" do
-      @ability.should be_able_to :index, :blur_shards
-    end
-
-    it "can destroy the zookeeper tree" do
-      @ability.should be_able_to :destroy, :zookeepers
-      @ability.should be_able_to :destroy, :clusters
-      @ability.should be_able_to :destroy, :blur_shards
-      @ability.should be_able_to :destroy, :blur_controllers
-    end
-
-    it "can perform destructive actions hdfs" do
-      @ability.should be_able_to :move_file, :hdfs
-      @ability.should be_able_to :delete_file, :hdfs
-      @ability.should be_able_to :mkdir, :hdfs
-      @ability.should be_able_to :upload_form, :hdfs
-      @ability.should be_able_to :upload, :hdfs
-    end
-  end
-
-  describe "when an auditor" do
-    before(:each) do
-      @user = FactoryGirl.create :user, :roles => ['auditor']
-      @ability = Ability.new @user
-    end
-  
-    it "can view blur query string" do
-      @ability.should be_able_to :index, :blur_queries, :query_string
-      @ability.should be_able_to :show, :blur_queries, :query_string
-      @ability.should be_able_to :index, :audits
-    end
-  end
-  
-  describe "when an admin" do
-    before(:each) do
-      @user = FactoryGirl.create :user, :roles => ['admin']
-      @ability = Ability.new @user
-      @other_user = User.new
-    end
-
-    it "can edit, and delete other users" do
-      @ability.should be_able_to :index, :users
-      @ability.should be_able_to :edit, @other_user
-      @ability.should be_able_to :destroy, @other_user
-    end
-
-    it "can update other users' roles" do
-      @ability.should be_able_to :update, @other_user, :roles
-    end
-
-    it "can not view other individual users" do
-      @ability.should_not be_able_to :show, @other_user
-    end
-
-    it "can not update other users' username, or password" do
-      @ability.should_not be_able_to :update, @other_user, :username
-      @ability.should_not be_able_to :update, @other_user, :password
-      @ability.should_not be_able_to :update, @other_user, :password_confirmation
-    end
-    
-    it "can update other users' email" do
-      @ability.should be_able_to :update, @other_user, :email
-    end
-
-    it "can create users with roles" do
-      @ability.should be_able_to :new, :users
-      @ability.should be_able_to :create, :users, :admin
-      @ability.should be_able_to :create, :users, :editor
-    end
-  end
-
-  describe "when a searcher" do
-    before do
-      @user = FactoryGirl.create :user, :roles => ['searcher']
-      @ability = Ability.new @user
-    end
-
-    it "can view and use the search page" do
-      @ability.should be_able_to :access, :searches
-    end
-
-    it "can change own column preferences" do
-      @preference = FactoryGirl.create :preference, :user_id => @user.id, :pref_type => 'column'
-      @ability.should be_able_to :update, @preference
-    end
-
-    it "can change own zookeeper preferences" do
-      @preference = FactoryGirl.create :preference, :user_id  => @user.id, :pref_type => 'zookeeper'
-      @ability.should be_able_to :update, @preference
-    end
-    
-    it "can change own filter preferences" do
-      @preference = FactoryGirl.create :preference, :user_id => @user.id, :pref_type => 'filter'
-      @ability.should be_able_to :update, @preference
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/models/admin_setting_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/models/admin_setting_spec.rb b/blur-admin/spec/models/admin_setting_spec.rb
deleted file mode 100644
index bb268b4..0000000
--- a/blur-admin/spec/models/admin_setting_spec.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-require 'spec_helper'
-
-describe AdminSetting do
-  describe "search filter" do
-    it "should create a new setting when one doesnt exist" do
-      before_count = AdminSetting.all.count
-      AdminSetting.search_filter
-      before_count.should == AdminSetting.all.count - 1
-    end
-
-    it "should return a setting when one does exist" do
-      setting = FactoryGirl.create :admin_setting, :setting => "regex_filter"
-      AdminSetting.search_filter.should == setting
-    end
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/models/audit_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/models/audit_spec.rb b/blur-admin/spec/models/audit_spec.rb
deleted file mode 100644
index 99885f5..0000000
--- a/blur-admin/spec/models/audit_spec.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-require 'spec_helper'
-
-describe Audit do
-  describe "log_event" do
-    it "should downcase the model and the mutation" do
-      # This test is purely for string collision and readability
-      user = FactoryGirl.create :user
-      zookeeper = FactoryGirl.create :zookeeper
-      created_audit = Audit.log_event user, "Message", "MoDeL", "MuTaTiOn", zookeeper
-      created_audit.mutation.should == "mutation"
-      created_audit.model_affected == "model"
-    end
-  end
-
-  describe "scope" do
-    it "should return the audits within the given time range" do
-      # Create a set of queries with different created at times
-      FactoryGirl.create :audit, :created_at => 10.days.ago
-      returned = [FactoryGirl.create(:audit, :created_at => 1.days.ago)]
-
-      # Grab all the audits within the last 72 hours
-      recent = Audit.recent 72, 0
-      recent.should == returned
-    end
-  end
-
-  describe "summary" do
-    it 'should return a hash with the correct data' do
-      audit = FactoryGirl.create :audit
-      summary = audit.summary
-      summary.should include(:action)
-      summary.should include(:date_audited)
-      summary.should include(:model)
-      summary.should include(:mutation)
-      summary.should include(:username)
-      summary.should include(:user)
-      summary.should include(:zookeeper_affected)
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/models/blur_controller_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/models/blur_controller_spec.rb b/blur-admin/spec/models/blur_controller_spec.rb
deleted file mode 100644
index 4713372..0000000
--- a/blur-admin/spec/models/blur_controller_spec.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require 'spec_helper'
-
-describe BlurController do
-  describe "as json" do
-    it "should not have the date fields" do
-      controller = FactoryGirl.create :blur_controller
-      controller.as_json.should_not include("updated_at")
-      controller.as_json.should_not include("created_at")
-    end
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/models/blur_query_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/models/blur_query_spec.rb b/blur-admin/spec/models/blur_query_spec.rb
deleted file mode 100644
index 9b92128..0000000
--- a/blur-admin/spec/models/blur_query_spec.rb
+++ /dev/null
@@ -1,102 +0,0 @@
-require 'spec_helper'
-
-describe BlurQuery do
-  before(:each) do
-    @client = mock Blur::Blur::Client
-    BlurThriftClient.stub(:client).and_return(@client)
-    @client.stub :cancelQuery
-    @table = FactoryGirl.create :blur_table
-    @query = FactoryGirl.create :blur_query
-    @zookeeper = FactoryGirl.create :zookeeper
-    @query.blur_table = @table
-    @table.stub(:zookeeper).and_return(@zookeeper)
-  end
-
-  describe "cancel" do
-    context "call to client.cancelQuery is successful" do
-      it "should return true" do
-        @client.should_receive(:cancelQuery).with(@table.table_name, @query.uuid).and_return nil
-        @query.cancel.should be true
-      end
-    end
-
-    context "call to client.cancelQuery is unsuccessful" do
-      it "should return false" do
-        @client.should_receive(:cancelQuery) { raise Exception }
-        @query.cancel.should be false
-      end
-    end
-  end
-
-  describe 'state string' do
-    it 'should return running when the state is 0' do
-      @query.state = 0
-      @query.state_str.should == "Running"
-    end
-
-    it 'should return Interrupted when the state is 1' do
-      @query.state = 1
-      @query.state_str.should == "Interrupted"
-    end
-
-    it 'should return complete when the state is 2' do
-      @query.state = 2
-      @query.state_str.should == "Complete"
-    end
-
-    it 'should return nil when the state is anyhting else' do
-      @query.state = 3
-      @query.state_str.should == nil
-    end
-  end
-
-  describe 'complete' do
-    it 'should return 0 when there arent any shards' do 
-      @query.total_shards = 0
-      @query.complete.should == 0
-    end
-
-    it 'should return the number of complete over total when there are shards working' do 
-      @query.total_shards = 4
-      @query.complete_shards = 2
-      @query.complete.should == 0.5
-    end
-  end
-
-  describe 'summary' do
-    it 'should hide the query when the user does not have the proper privileges' do 
-      @user = FactoryGirl.create :user, :roles => ['reader']
-      @query.summary(@user)[:query].should be_nil
-    end
-
-    it 'should show the query when the user has the proper privileges' do 
-      @user = FactoryGirl.create :user
-      @query.summary(@user)[:query].should == @query.query_string
-    end
-
-    context 'summary_state' do
-      before(:each) do
-        @user = FactoryGirl.create :user
-      end
-
-      it 'should return the percent complete if the state is 0' do
-        @query.state = 0
-        @query.total_shards = 4
-        @query.complete_shards = 2
-        @query.summary(@user)[:status].should == '50%'
-      end
-
-      it 'should return the percent complete and interrupted if the state is 1' do
-        @query.state = 1
-        @query.total_shards = 4
-        @query.complete_shards = 2
-        @query.summary(@user)[:status].should == '(Interrupted) - 50%'
-      end
-
-      it 'should return complete if the state is 2' do
-        @query.state = 2
-        @query.summary(@user)[:status].should == 'Complete'
-      end
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/models/blur_shard_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/models/blur_shard_spec.rb b/blur-admin/spec/models/blur_shard_spec.rb
deleted file mode 100644
index 59970f4..0000000
--- a/blur-admin/spec/models/blur_shard_spec.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-require 'spec_helper'
-
-describe BlurShard do
-  describe "destroy_parent_cluster" do
-    before do
-      @cluster = FactoryGirl.create :cluster
-      @shard = FactoryGirl.create :blur_shard
-      @shard.stub!(:cluster).and_return @cluster
-    end
-
-    it "should do nothing when it has siblings" do
-      @cluster.stub_chain(:blur_shards, :count).and_return 1
-      @shard.destroy
-      @cluster.should_not_receive(:destroy)
-    end
-    it "should destroy the cluster when all the shards are destroyed" do
-      @cluster.stub_chain(:blur_shards, :count).and_return 0
-      @cluster.should_receive(:destroy)
-      @shard.destroy
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/models/blur_table_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/models/blur_table_spec.rb b/blur-admin/spec/models/blur_table_spec.rb
deleted file mode 100644
index a8f26aa..0000000
--- a/blur-admin/spec/models/blur_table_spec.rb
+++ /dev/null
@@ -1,228 +0,0 @@
-require 'spec_helper'
-
-describe BlurTable do
-
-  before(:each) do
-    @client = mock(ThriftClient)
-    BlurThriftClient.stub!(:client).and_return(@client)
-    @table = FactoryGirl.create :blur_table
-  end
-
-  describe "as_json" do
-    it 'return the expected values' do
-      test_json = @table.as_json
-      test_json.should_not include("server")
-      test_json.should_not include("table_schema")
-      test_json.should include("queried_recently")
-      test_json.should include("server_info")
-      test_json.should include("comments")
-    end
-  end
-
-  describe "boolean state methods" do
-    describe "is_enabled?" do
-      it "should return true when the status is 4" do
-        enabled_table = FactoryGirl.create :blur_table, :table_status => 4
-        enabled_table.is_enabled?.should == true
-      end
-    end
-
-    describe "is_disabled?" do
-      it "should return true when the status is 2" do
-        enabled_table = FactoryGirl.create :blur_table, :table_status => 2
-        enabled_table.is_disabled?.should == true
-      end
-    end
-
-    describe "is_deleted?" do
-      it "should return true when the status is 0" do
-        enabled_table = FactoryGirl.create :blur_table, :table_status => 0
-        enabled_table.is_deleted?.should == true
-      end
-    end
-  end
-
-  describe "enable " do
-    it "method sends the message to enable the table through thrift" do
-      @client.should_receive(:enableTable).with @table.table_name
-      @table.enable 'test:40000'
-    end
-  end
-
-  describe "disable" do
-    it "should send the message to disable the table through thrift" do
-      @client.should_receive(:disableTable).with(@table.table_name)
-      @table.disable 'test:40000'
-    end
-  end
-
-  describe "blur_destroy" do
-    it "should send the message to remove the table through thrift with underlying false when not specified" do
-      @client.should_receive(:removeTable).with(@table.table_name, false)
-      @table.blur_destroy('test:40000').should == true
-    end
-
-    it "should send the message to remove the table through thrift with underlying true" do
-      @client.should_receive(:removeTable).with(@table.table_name, true)
-      @table.blur_destroy(true, 'test:40000').should == true
-    end
-
-    it "should return false when the destroy errors" do
-      @client.should_receive(:removeTable).with(@table.table_name, true).and_raise "Exception"
-      @table.blur_destroy(true, 'test:40000').should == false
-    end
-  end
-
-  describe "schema" do
-    it "returns the table schema in a ruby hash, with hosts as keys and array of shards as values" do
-      @table.hosts.should == JSON.parse( @table.server )
-      @table.hosts.keys.each {|host| host.should match  /Host/}
-      @table.hosts.values.flatten.each {|shard| shard.should match /shard/}
-    end
-
-    it "sorts the columns and column families alphabetically" do
-      @unsorted_table = Factory.create :blur_table,
-        :table_name => 'test_table',
-        :table_schema =>      [
-                                {
-                                  "name" => 'ColumnFamily2',
-                                  "columns" => [
-                                    {"name" => 'Column2A'},
-                                    {"name" => 'Column2B'},
-                                    {"name" => 'Column2C'}
-                                  ]
-                                },
-                                {
-                                  "name" => 'ColumnFamily1',
-                                  "columns" => [
-                                    {"name" => 'Column1A'},
-                                    {"name" => 'Column1B'},
-                                    {"name" => 'Column1C'}
-                                  ]
-                                },
-                                {
-                                  "name" => 'ColumnFamily3',
-                                  "columns" => [
-                                    {"name" => 'Column3A'},
-                                    {"name" => 'Column3B'},
-                                    {"name" => 'Column3C'}
-                                  ]
-                                }
-                              ].to_json
-
-      @sorted_table = Factory.create :blur_table,
-        :table_name => 'test-table',
-        :table_schema =>      [
-                                {
-                                  "name" => 'ColumnFamily1',
-                                  "columns" => [
-                                    {"name" => 'Column1A'},
-                                    {"name" => 'Column1B'},
-                                    {"name" => 'Column1C'}
-                                  ]
-                                },
-                                {
-                                  "name" => 'ColumnFamily2',
-                                  "columns" => [
-                                    {"name" => 'Column2A'},
-                                    {"name" => 'Column2B'},
-                                    {"name" => 'Column2C'}
-                                  ]
-                                },
-                                {
-                                  "name" => 'ColumnFamily3',
-                                  "columns" => [
-                                    {"name" => 'Column3A'},
-                                    {"name" => 'Column3B'},
-                                    {"name" => 'Column3C'}
-                                  ]
-                                }
-                              ].to_json
-
-
-        @unsorted_table.schema.should == @sorted_table.schema
-    end
-
-    it "sorts the column families by an optionally supplied block" do
-      @unsorted_table = Factory.create :blur_table,
-        :table_name => 'test_table',
-        :table_schema =>      [
-                                {
-                                  "name" => 'ColumnFamily1',
-                                  "columns" => [
-                                    {"name" => 'Column1A'},
-                                    {"name" => 'Column1B'},
-                                    {"name" => 'Column1C'}
-                                  ]
-                                },
-                                {
-                                  "name" => 'ColumnFamily2',
-                                  "columns" => [
-                                    {"name" => 'Column2A'},
-                                    {"name" => 'Column2B'},
-                                    {"name" => 'Column2C'}
-                                  ]
-                                },
-                                {
-                                  "name" => 'ColumnFamily3',
-                                  "columns" => [
-                                    {"name" => 'Column3A'},
-                                    {"name" => 'Column3B'},
-                                    {"name" => 'Column3C'}
-                                  ]
-                                }
-                              ].to_json
-
-      @reverse_sort_table = Factory.create :blur_table,
-        :table_name => 'test_table',
-        :table_schema =>      [
-                                {
-                                  "name" => 'ColumnFamily3',
-                                  "columns" => [
-                                    {"name" => 'Column3A'},
-                                    {"name" => 'Column3B'},
-                                    {"name" => 'Column3C'}
-                                  ]
-                                },
-                                {
-                                  "name" => 'ColumnFamily2',
-                                  "columns" => [
-                                    {"name" => 'Column2A'},
-                                    {"name" => 'Column2B'},
-                                    {"name" => 'Column2C'}
-                                  ]
-                                },
-                                {
-                                  "name" => 'ColumnFamily1',
-                                  "columns" => [
-                                    {"name" => 'Column1A'},
-                                    {"name" => 'Column1B'},
-                                    {"name" => 'Column1C'}
-                                  ]
-                                }
-                              ].to_json
-
-
-      @reverse_sort_table.schema.should == @unsorted_table.schema {|a, b| a['name'] <=> b['name']}
-    end
-
-    it "returns nil when the server has not been populated" do
-      blur_table = BlurTable.new
-      blur_table.server.should be nil
-    end
-  end
-
-  describe "row_count" do
-    it "returns the row count" do
-      @table.row_count = 1234567
-      @table.row_count.should == "1,234,567"
-    end
-  end
-
-  describe "terms" do
-    it "requests terms from client" do
-      @client.should_receive(:terms).with(@table.table_name, 'colFam', 'col', '', 123)
-      @table.terms('test:40000', 'colFam', 'col', '', 123)
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/models/cluster_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/models/cluster_spec.rb b/blur-admin/spec/models/cluster_spec.rb
deleted file mode 100644
index 6af30a3..0000000
--- a/blur-admin/spec/models/cluster_spec.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-require 'spec_helper'
-
-describe Cluster do
-  before(:each) do
-    @cluster = FactoryGirl.create :cluster_with_shard
-  end
-
-  describe 'as_json' do
-    it "should have the can_update and cluster_queried in the json when the blur table flag is true" do
-      test_json = @cluster.as_json({:blur_tables => true})
-      puts @cluster.can_update
-      test_json.should include("can_update")
-      test_json.should include("cluster_queried")
-    end
-
-    it "should have the can_update and cluster_queried in the json when the blur table flag is true" do
-      test_json = @cluster.as_json({:blur_tables => false})
-      puts @cluster.can_update
-      test_json.should include("shard_blur_version")
-      test_json.should include("shard_status")
-    end
-  end
-
-  describe 'shard_version' do
-    it 'should return the common blur version when there is a single version' do
-      @cluster.shard_version.should == @cluster.blur_shards.first.blur_version
-    end
-
-    it 'should return inconsistent when there are multiple blur versions' do
-      @incon_cluster = FactoryGirl.create :cluster_with_shards
-      @incon_cluster.shard_version.should == "Inconsistent Blur Versions"
-    end
-
-    it 'should return no shards message when there arent any versions' do
-      @empty_cluster = FactoryGirl.create :cluster
-      @empty_cluster.shard_version.should == "No shards in this Cluster!"
-    end
-  end
-
-  describe 'shard_status' do
-    it 'should return the correct ratio of online to offline shards' do
-      @test_cluster = FactoryGirl.create :cluster_with_shards_online
-      @test_cluster.shard_status.should == "3 | 3"
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/models/hdfs_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/models/hdfs_spec.rb b/blur-admin/spec/models/hdfs_spec.rb
deleted file mode 100644
index 83ce152..0000000
--- a/blur-admin/spec/models/hdfs_spec.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-require 'spec_helper'
-
-describe Hdfs do
-  before :each do
-    @hdfs = FactoryGirl.create :hdfs
-    @hdfs_stat = FactoryGirl.create :hdfs_stat
-    @hdfs_stat2 = FactoryGirl.create :hdfs_stat
-    @hdfs.stub!(:hdfs_stats).and_return [@hdfs_stat2, @hdfs_stat]
-  end
-
-  it 'returns the most recent stats' do
-    @hdfs.most_recent_stats.should == @hdfs_stat
-  end
-
-  it 'returns true if stats were updated less than 1 minute ago' do
-    @hdfs_stat.created_at = Time.now
-    @hdfs.recent_stats.should == true
-  end
-
-  it 'returns false if stats were not updated in the last minute' do
-    @hdfs_stat.created_at = Time.now - 1000*2
-    @hdfs.recent_stats.should == false
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/models/hdfs_stat_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/models/hdfs_stat_spec.rb b/blur-admin/spec/models/hdfs_stat_spec.rb
deleted file mode 100644
index 87f07be..0000000
--- a/blur-admin/spec/models/hdfs_stat_spec.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-require 'spec_helper'
-
-describe HdfsStat do
-  before(:each) do
-    @stat = FactoryGirl.create :hdfs_stat
-  end
-
-  it 'capacity should return the capacity in gigabytes' do
-    @stat.present_capacity = 3 * 1024**3
-    @stat.capacity.should == 3
-    @stat.capacity.kind_of? Float
-  end
-
-  it 'capacity should return the capacity in gigabytes' do
-    @stat.dfs_used_real = 3 * 1024**3
-    @stat.used.should == 3
-    @stat.capacity.kind_of? Float 
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/models/search_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/models/search_spec.rb b/blur-admin/spec/models/search_spec.rb
deleted file mode 100644
index 6ebe1d7..0000000
--- a/blur-admin/spec/models/search_spec.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-require 'spec_helper'
-
-describe Search do
-  before(:each) do
-    @user = FactoryGirl.create :user
-    @search = FactoryGirl.create :search, :user_id => @user
-  end
-
-  describe 'blur_query' do
-    it 'should create a BlurQuery object with its attributes' do
-      User.stub!(:find).and_return(@user)
-      Blur::SimpleQuery.should_receive(:new)
-      Blur::BlurQuery.should_receive(:new)
-      @search.blur_query
-    end
-  end
-
-  describe 'column_object' do
-    it 'should assign the column_object instance variable to the json parsed values when there are columns' do
-      @search.column_object
-      @search.instance_variable_get(:@column_object).should == ["family_-sep-_ColumnFamily1", 
-                                                               "column_-sep-_ColumnFamily2_-sep-_Column2A",
-                                                               "column_-sep-_ColumnFamily2_-sep-_Column2B",
-                                                               "column_-sep-_ColumnFamily3_-sep-_Column3C"]
-    end
-
-    it 'should assign the column_object instance variable to and empty array when there arent any columns' do
-      @search_without_columns = FactoryGirl.create :search, :user_id => @user, :columns => [].to_json
-      @search_without_columns.column_object
-      @search_without_columns.instance_variable_get(:@column_object).should == []
-    end
-  end
-
-  describe 'column_families' do
-    it 'should return an array of all the column families' do
-      @search.column_families.should == ['ColumnFamily1']
-    end
-  end
-
-  describe 'columns_hash' do
-    it 'should create a hash from column family name (excluding full column families) to column' do 
-      @search.columns_hash.should == {'ColumnFamily2' => ['recordId', 'Column2A', 'Column2B'], 'ColumnFamily3' => ['recordId', 'Column3C']}
-    end
-  end
-
-  describe 'selector' do
-    it 'should create a new selecrtor' do
-      Blur::Selector.should_receive(:new)
-      @search.selector
-    end
-  end
-
-  describe 'fetch_results' do
-    it 'should fetch the results from blur' do
-      mock_client = mock(HdfsThriftClient::Client)
-      mock_query = mock(Blur::BlurQuery)
-      @search.stub!(:blur_query).and_return(mock_query)
-      BlurThriftClient.should_receive(:client).with('URL').and_return(mock_client)
-      mock_client.should_receive(:query).with('NAME', mock_query)
-      @search.fetch_results('NAME', 'URL')
-    end
-  end
-
-  describe 'schema' do
-    it "should use the columns hash, column families, and the table schema to build a complete schema for the search" do
-      @blur_table = FactoryGirl.create :blur_table
-      result = @search.schema @blur_table
-      result.each do |family|
-        definition = family.last
-        keys = definition.keys
-        keys.should == ["name", "columns"]
-        definition['columns'].first['name'].should == 'recordId'
-      end
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/models/user_session_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/models/user_session_spec.rb b/blur-admin/spec/models/user_session_spec.rb
deleted file mode 100644
index 8fec316..0000000
--- a/blur-admin/spec/models/user_session_spec.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-require 'spec_helper'
-
-describe UserSession do
-  before :each do
-    activate_authlogic
-    @user_session = UserSession.new
-  end
-
-  describe "to_key" do
-    it "returns nil when it is a new record " do
-      @user_session.stub!(:new_record?).and_return(true)
-      @user_session.to_key.should be_nil
-    end
-
-    it "sends its primary key when it is a new record " do
-      @user_session.stub!(:new_record?).and_return(false)
-      @user_session.stub_chain(:class, :primary_key).and_return 1
-      @user_session.should_receive(:send).with 1
-      @user_session.to_key
-    end
-  end 
-
-  describe "persisted?" do
-    it "always returns false" do
-      @user_session.persisted?.should be_false
-    end
-  end 
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/models/user_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/models/user_spec.rb b/blur-admin/spec/models/user_spec.rb
deleted file mode 100644
index 7b88ee1..0000000
--- a/blur-admin/spec/models/user_spec.rb
+++ /dev/null
@@ -1,151 +0,0 @@
-require 'spec_helper'
-
-describe 'User Model' do
-
-  before do
-    @user = User.new( :username              => 'bob', 
-                      :email                 => 'bob@example.com',
-                      :password              => 'password',
-                      :password_confirmation => 'password')
-  end
-
-  describe 'create a user' do
-    it 'is valid with valid parameters' do
-      @user.should be_valid
-    end
-
-    it 'is invalid with no username' do
-      @user.username = nil
-      @user.should_not be_valid
-    end
-
-    it 'is invalid with no password' do
-      @user.password = nil
-      @user.password_confirmation = nil
-      @user.should_not be_valid
-    end
-    
-    it 'is invalid with no email' do
-      @user.email = nil
-      @user.should_not be_valid
-    end
-
-    it 'is invalid with invalid email' do
-      @user.email = 'invalid'
-      @user.should_not be_valid
-      @user.email = 'invalid@'
-      @user.should_not be_valid
-    end
-    
-    
-    it 'is invalid with duplicate username' do
-      @user.save
-      duplicate_user = User.new(:username              => @user.username,
-                                :email                 => 'dup_user@example.com',
-                                :password              => 'dup_password', 
-                                :password_confirmation => 'dup_password')
-      duplicate_user.should_not be_valid
-    end
-
-    it 'is invalid with duplicate email'  do
-      @user.save
-      duplicate_user = User.new(:username              => 'duplicate_user',
-                                :email                 => @user.email,
-                                :password              => 'dup_password', 
-                                :password_confirmation => 'dup_password')
-      duplicate_user.should_not be_valid
-    end
-
-    it 'is valid with long username' do
-      username = ''
-      100.times {username += 'a'}
-      @user.username = username
-      @user.should be_valid
-    end
-    
-    it 'is valid with email missing dot ending' do
-      @user.email = "tester@test"
-      @user.should be_valid
-    end
-
-    it 'is invalid with short password' do
-      password = 'abc'
-      @user.password = password
-      @user.password_confirmation = password
-      @user.should_not be_valid
-    end
-
-    it 'is valid with non alpha-numeric characters in password' do
-      password = "aA1!,.:' "
-      @user.password = password
-      @user.password_confirmation = password
-      @user.should be_valid
-    end
-  end
-
-  describe 'ability' do
-    it 'should create a new ability when an ability isnt cached' do
-      Ability.should_receive(:new).with(@user)
-      @user.ability
-    end
-  end
-
-  describe 'column preference' do
-    it 'should return your saved preference when a preference exists' do
-      user_with_preference = FactoryGirl.create :user_with_preferences
-      user_with_preference.column_preference.should == user_with_preference.preferences.first
-    end
-
-    it 'should create a new saved preference when a preference does not exist' do
-      user_without_preference = FactoryGirl.create :user
-      user_without_preference.column_preference.pref_type.should == 'column'
-      user_without_preference.column_preference.value.should == []
-    end
-  end
-
-  describe 'zookeeper_preference' do
-    it 'should return your zookeeper preference when a preference exists' do
-      user_with_preferences = FactoryGirl.create :user_with_preferences
-      user_with_preferences.zookeeper_preference.should == user_with_preferences.preferences.last
-    end
-
-    it 'should create a new zookeeper preference when a preference does not exist' do
-      user_without_preference = FactoryGirl.create :user
-      user_without_preference.zookeeper_preference.pref_type.should == 'zookeeper'
-      user_without_preference.zookeeper_preference.value.should == nil
-    end
-  end
-
-  describe 'roles' do
-    before(:each) do
-      @user_role = FactoryGirl.create :user, :roles => []
-    end
-    it 'roles= should set the roles mask to the mask of the array given' do
-      @user_role.roles = %w[editor]
-      @user_role.roles_mask = 16
-      @user_role.roles = %w[editor admin reader auditor searcher]
-      @user_role.roles_mask = 31
-    end
-
-    it 'roles should return the array of all valid roles for this user' do
-      @user_role.roles = %w[editor]
-      @user_role.roles.should == ['editor']
-    end
-
-    it 'is? should return true if the user is a specific role and false if not' do
-      @user_role.roles = %w[editor]
-      @user_role.is?(:editor).should == true
-      @user_role.is?('editor').should == true
-      @user_role.is?(:admin).should == false
-    end
-
-    it 'the dynamically defined methods should return tru if they are that role' do
-      @user_role.roles = %w[editor]
-      @user_role.editor?.should == true
-      @user_role.admin?.should == false
-      @user_role.editor.should == true
-      @user_role.admin.should == false
-    end
-  end
-end
-

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/models/zookeeper_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/models/zookeeper_spec.rb b/blur-admin/spec/models/zookeeper_spec.rb
deleted file mode 100644
index 75f889b..0000000
--- a/blur-admin/spec/models/zookeeper_spec.rb
+++ /dev/null
@@ -1,67 +0,0 @@
-require 'spec_helper'
-
-describe Zookeeper do
-  before do
-    @user = FactoryGirl.create :user_with_preferences
-    @ability = Ability.new @user
-
-    # Allow the user to perform all of the actions
-    @ability.stub!(:can?).and_return(true)
-  end
-
-  describe 'long running queries' do
-    before do
-      @zookeeper_with_queries = FactoryGirl.create :zookeeper_with_blur_queries
-      Zookeeper.stub!(:find).and_return(@zookeeper_with_queries)
-      query = @zookeeper_with_queries.blur_queries[rand @zookeeper_with_queries.blur_queries.count]
-      query.state = 0
-      query.created_at = 5.minutes.ago
-      query.save!
-    end
-
-    it "should get the long running query" do
-      stats = @zookeeper_with_queries.long_running_queries @user
-      stats.count.should == 1
-      stats[0]["state"] == 0
-    end
-  end
-
-  describe 'refresh queries' do
-    it "should get the queries within the lower range" do
-      @zookeeper = FactoryGirl.create :zookeeper
-      test = mock('BlurQuery')
-      @zookeeper.stub!(:blur_queries).and_return test
-      test.should_receive(:where).with(kind_of(String), 14, 4)
-      @zookeeper.refresh_queries 14
-    end
-  end
-
-  describe 'as json' do
-    it "should remove the online_ensemble_nodes key and add ensembles" do
-      @zookeeper = FactoryGirl.create :zookeeper
-      result = @zookeeper.as_json
-      result.should_not include("online_ensemble_nodes")
-      result.should include("ensemble")
-    end
-  end
-
-  describe 'dashboard stats' do
-    it "should call query with the large sql string" do
-      FactoryGirl.create :zookeeper
-      result = Zookeeper.dashboard_stats
-      result.first.keys.should include("name", "zookeeper_status", "id", "controller_version", "controller_offline_node", "controller_total", "shard_version", "shard_offline_node", "shard_total", "long_running_queries")
-    end
-  end
-
-  describe 'clusters with query status' do
-    it "should return the clusters with tables and their query counts" do
-      @zookeeper = FactoryGirl.create :zookeeper_with_blur_queries
-      result = @zookeeper.clusters_with_query_status(@user)
-      result.each do |cluster|
-        cluster.blur_tables.each do |table|
-          table.query_count.should_not be_nil
-        end
-      end
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/requests/admin_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/requests/admin_spec.rb b/blur-admin/spec/requests/admin_spec.rb
deleted file mode 100644
index 01d06bd..0000000
--- a/blur-admin/spec/requests/admin_spec.rb
+++ /dev/null
@@ -1,146 +0,0 @@
-require 'spec_helper'
-
-describe "Admin" do
-  before(:each) do
-    setup_tests
-    visit users_path
-  end
-
-
-  context "Page is loaded" do
-    it "should display the admin table" do
-      page.should have_css('div', :id => 'users_table')
-    end
-    it "should have the correct table headers" do
-      page.should have_content('Username')
-      page.should have_content('Name')
-      page.should have_content('Email')
-      page.should have_content('Roles')
-      page.should have_content('Actions')
-    end
-    it "should display an edit button for the user" do
-      find_link('Edit')[:href].should == edit_user_path(@user.id)
-    end
-    it "should display a button to create a new user" do
-      find_link('New User')[:href].should == new_user_path
-    end
-  end
-
-  context "A user is being edited" do
-    before(:each) do
-      visit users_path
-      click_link 'Edit'
-    end
-    it "should render the edit user form" do
-      current_path.should == edit_user_path(@user.id)
-      page.should have_field('user_name')
-      page.should have_field('user_email')
-      page.should have_field('user_password')
-      page.should have_field('user_password_confirmation')
-
-      page.should have_field('user_role_editor')
-      page.should have_field('user_role_admin')
-      page.should have_field('user_role_reader')
-      page.should have_field('user_role_auditor')
-      page.should have_field('user_role_searcher')
-      page.should have_button('Save')
-      page.should have_link('Cancel')
-    end
-    it "should allow a user's permissions to be changed" do
-      uncheck('user_role_searcher')
-      click_on('Save')
-      click_link('Edit')
-      page.should have_field('user_role_searcher', :checked => false)
-    end
-    it "should allow a user's username to be changed" do
-      fill_in 'user_username', :with => "Test"
-      click_on 'Save'
-      click_link 'Edit'
-      find_field('user_username').value.should == "Test"
-    end
-    it "should allow a user's name to be changed" do
-      fill_in 'user_name', :with =>'Test'
-      click_on 'Save'
-      click_link 'Edit'
-      find_field('user_name').value.should == 'Test'
-    end
-    it "should allow a user's email to be changed" do
-      fill_in 'user_email', :with => "test@test.com"
-      click_on 'Save'
-      click_link 'Edit'
-      find_field('user_email').value.should == "test@test.com"
-    end
-    it "should allow a user's password to be changed" do
-      fill_in 'user_password', :with => 'newpass'
-      fill_in  'user_password_confirmation', :with => 'newpass'
-      click_on 'Save'
-      click_on 'Log Out'
-      fill_in 'user_session_username', :with => @user.username
-      fill_in 'user_session_password', :with => 'newpass'
-      click_on 'Log In'
-      current_path.should == root_path
-    end
-    it "should redirect to the user's page when cancel is clicked" do
-      click_link 'Cancel'
-      current_path.should == users_path
-    end
-  end
-  context "A user is being created" do
-    before(:each) do
-      visit users_path
-      click_on 'New User'
-    end
-    it "should render the new user form" do
-      current_path.should == new_user_path
-      page.should have_field('user_name')
-      page.should have_field('user_email')
-      page.should have_field('user_password')
-      page.should have_field('user_password_confirmation')
-
-      page.should have_field('user_role_editor')
-      page.should have_field('user_role_admin')
-      page.should have_field('user_role_reader')
-      page.should have_field('user_role_auditor')
-      page.should have_field('user_role_searcher')
-      page.should have_button('Save')
-      page.should have_link('Cancel')
-    end
-    it "should allow the creation of a new user" do
-      current_path.should == new_user_path
-      create_a_user
-
-      current_path.should == users_path
-      page.all('table#users_table tr').count.should==3
-      page.find('table', :id => 'users_table').text.should have_content('test')
-      page.find('table', :id => 'users_table').text.should have_content('test name')
-      page.find('table', :id => 'users_table').text.should have_content('test@test.com')
-      page.find('table', :id => 'users_table').text.should have_content('editor, reader, auditor, searcher')
-    end
-  end
-  context "The delete user button is pressed" do
-    before(:each) do
-      visit users_path
-      click_on 'New User'
-      create_a_user
-    end
-    it "should delete a user", js: true do
-      click_on 'Delete'
-      #Capybara does not support confirmation boxes through rails so just have to assume that the user clicks yes
-      page.evaluate_script('window.confirm = function() { return true; }')
-      page.should have_content('User Removed')
-    end
-  end
-
-  def create_a_user
-    fill_in 'user_username', :with => 'test'
-    fill_in 'user_name', :with => 'test name'
-    fill_in 'user_email', :with => 'test@test.com'
-    fill_in 'user_password', :with => 'testpass'
-    fill_in 'user_password_confirmation', :with => 'testpass'
-    check 'user_role_editor'
-    check 'user_role_reader'
-    check 'user_role_auditor'
-    check 'user_role_searcher'
-    click_on 'Save'
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/requests/audits_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/requests/audits_spec.rb b/blur-admin/spec/requests/audits_spec.rb
deleted file mode 100644
index 6e1cd11..0000000
--- a/blur-admin/spec/requests/audits_spec.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-require 'spec_helper'
-
-describe "Audits" do
-  before(:each) do
-    setup_tests
-    visit audits_path
-  end
-  context "Page is loaded" do
-    it "should show the audits table" do
-      page.should have_css('div', :id => 'audits_table')
-    end
-    it "should have the correct table headers" do
-      page.should have_content('Action Taken')
-      page.should have_content('Username')
-      page.should have_content('User')
-      page.should have_content('Zookeeper/Root Path')
-      page.should have_content('Model Affected')
-      page.should have_content('Mutation Type')
-      page.should have_content('Date')
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/requests/blur_queries_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/requests/blur_queries_spec.rb b/blur-admin/spec/requests/blur_queries_spec.rb
deleted file mode 100644
index 072f8d0..0000000
--- a/blur-admin/spec/requests/blur_queries_spec.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-require 'spec_helper'
-
-describe "Blur Queries" do
-  before(:each) do
-    setup_tests
-    #    wait_for_ajax
-    #wait_for_dom
-  end
-  context "Page is loaded" do
-    it "should display the correct page elements" do
-      visit zookeeper_blur_queries_path(@zookeeper.id)
-      page.should have_table('queries-table')
-      page.should have_content('User ID')
-      page.should have_content('Query')
-      page.should have_content('Table Name')
-      page.should have_content('Starting Record')
-      page.should have_content('Time Submitted')
-      page.should have_content('Status')
-      page.should have_content('Actions/Info')
-      page.should have_css('div', :class => 'range_select')
-    end
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/spec/requests/login_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/spec/requests/login_spec.rb b/blur-admin/spec/requests/login_spec.rb
deleted file mode 100644
index 84728fb..0000000
--- a/blur-admin/spec/requests/login_spec.rb
+++ /dev/null
@@ -1,61 +0,0 @@
-require 'spec_helper'
-
-describe "login" do
-  # generate a valid user
-  let(:user) { Factory.create :user }
-
-  before do
-    visit login_path
-  end
-
-  context "with valid login credentials" do
-    before do
-      fill_in 'user_session_username', :with => user.username
-      fill_in 'user_session_password', :with => user.password
-      click_button 'Log In'
-    end
-
-    it "should render the dashboard" do
-      current_path.should == root_path
-    end
-  end
-
-  context "with invalid password" do
-    before do
-      fill_in 'user_session_username', :with => user.username
-      fill_in 'user_session_password', :with => 'invalid'
-      click_button 'Log In'
-    end
-
-    it "should render the new user sessions page with apppropriate errors" do
-      current_path.should == user_sessions_path
-      page.should have_selector '#error_explanation'
-      page.should have_content 'Password is not valid'
-    end
-  end
-
-  context "with invalid username" do
-    before do
-      fill_in 'user_session_username', :with => 'invalid'
-      fill_in 'user_session_password', :with => user.password
-      click_button 'Log In'
-    end
-
-    it "should render the new user sessions page with apppropriate errors" do
-      current_path.should == user_sessions_path
-      page.should have_selector '#error_explanation'
-      page.should have_content 'Username is not valid'
-    end
-  end
-  context "with no credentials" do
-    before do
-      click_button 'Log In'
-    end
-
-    it "should render the new user sessions page with apppropriate errors" do
-      current_path.should == user_sessions_path
-      page.should have_selector '#error_explanation'
-      page.should have_content 'You did not provide any details for authentication.'
-    end
-  end
-end


Mime
View raw message