From e7250a3ed153d90bdd6e26ed2cbcff871c3cb4ff Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 24 Nov 2010 14:36:09 -0500 Subject: [PATCH] rearrange things --- lib/apache/config.rb | 1 - spec/{ => apache}/apachify_spec.rb | 1 + spec/{ => apache}/config_spec.rb | 8 ++++++++ spec/{ => apache}/directory_spec.rb | 0 spec/{ => apache}/logging_spec.rb | 1 + spec/{ => apache}/master_spec.rb | 0 spec/{ => apache}/modules_spec.rb | 0 spec/{ => apache}/mpm_prefork_spec.rb | 0 spec/{ => apache}/performance_spec.rb | 0 spec/{ => apache}/permissions_spec.rb | 0 spec/{ => apache}/rewrites_spec.rb | 0 test/example_standalone.rb | 9 +++++++++ 12 files changed, 19 insertions(+), 1 deletion(-) rename spec/{ => apache}/apachify_spec.rb (96%) rename spec/{ => apache}/config_spec.rb (94%) rename spec/{ => apache}/directory_spec.rb (100%) rename spec/{ => apache}/logging_spec.rb (96%) rename spec/{ => apache}/master_spec.rb (100%) rename spec/{ => apache}/modules_spec.rb (100%) rename spec/{ => apache}/mpm_prefork_spec.rb (100%) rename spec/{ => apache}/performance_spec.rb (100%) rename spec/{ => apache}/permissions_spec.rb (100%) rename spec/{ => apache}/rewrites_spec.rb (100%) create mode 100644 test/example_standalone.rb diff --git a/lib/apache/config.rb b/lib/apache/config.rb index 136f0fb..1213f7e 100644 --- a/lib/apache/config.rb +++ b/lib/apache/config.rb @@ -1,4 +1,3 @@ -require 'rubygems' require 'fileutils' require 'rainbow' diff --git a/spec/apachify_spec.rb b/spec/apache/apachify_spec.rb similarity index 96% rename from spec/apachify_spec.rb rename to spec/apache/apachify_spec.rb index 63cb03a..3580a5e 100644 --- a/spec/apachify_spec.rb +++ b/spec/apache/apachify_spec.rb @@ -1,3 +1,4 @@ +require 'spec_helper' require 'apache/apachify' describe Apache::Apachify, "extends objects to apachify themselves" do diff --git a/spec/config_spec.rb b/spec/apache/config_spec.rb similarity index 94% rename from spec/config_spec.rb rename to spec/apache/config_spec.rb index c772907..93dc019 100644 --- a/spec/config_spec.rb +++ b/spec/apache/config_spec.rb @@ -108,3 +108,11 @@ describe Apache::Config, "builds configurations" do apache.to_a.should == [ '', '', ' MyTest', '', '' ] end end + +describe "Apache::Config used separately" do + context "it works" do + subject { Apache::Config.build_and_return { this_works }.first } + + it { should == "ThisWorks" } + end +end diff --git a/spec/directory_spec.rb b/spec/apache/directory_spec.rb similarity index 100% rename from spec/directory_spec.rb rename to spec/apache/directory_spec.rb diff --git a/spec/logging_spec.rb b/spec/apache/logging_spec.rb similarity index 96% rename from spec/logging_spec.rb rename to spec/apache/logging_spec.rb index 95333d5..a04b99f 100644 --- a/spec/logging_spec.rb +++ b/spec/apache/logging_spec.rb @@ -1,4 +1,5 @@ require 'spec_helper' +require 'apache/config' describe Apache::Config, "logging directives" do let(:apache) { Apache::Config } diff --git a/spec/master_spec.rb b/spec/apache/master_spec.rb similarity index 100% rename from spec/master_spec.rb rename to spec/apache/master_spec.rb diff --git a/spec/modules_spec.rb b/spec/apache/modules_spec.rb similarity index 100% rename from spec/modules_spec.rb rename to spec/apache/modules_spec.rb diff --git a/spec/mpm_prefork_spec.rb b/spec/apache/mpm_prefork_spec.rb similarity index 100% rename from spec/mpm_prefork_spec.rb rename to spec/apache/mpm_prefork_spec.rb diff --git a/spec/performance_spec.rb b/spec/apache/performance_spec.rb similarity index 100% rename from spec/performance_spec.rb rename to spec/apache/performance_spec.rb diff --git a/spec/permissions_spec.rb b/spec/apache/permissions_spec.rb similarity index 100% rename from spec/permissions_spec.rb rename to spec/apache/permissions_spec.rb diff --git a/spec/rewrites_spec.rb b/spec/apache/rewrites_spec.rb similarity index 100% rename from spec/rewrites_spec.rb rename to spec/apache/rewrites_spec.rb diff --git a/test/example_standalone.rb b/test/example_standalone.rb new file mode 100644 index 0000000..53fa68b --- /dev/null +++ b/test/example_standalone.rb @@ -0,0 +1,9 @@ +#!/usr/bin/ruby + +require 'rubygems' +gem 'apache-config' +require 'apache/config' + +puts Apache::Config.build_and_return do + this_works +end