spec/ezmlm/list_spec.rb
changeset 6 66beb495a861
parent 5 804e1c2b9a40
child 12 3cc813140c80
--- a/spec/ezmlm/list_spec.rb	Sat May 10 01:52:42 2008 +0000
+++ b/spec/ezmlm/list_spec.rb	Wed Aug 06 17:24:00 2008 +0000
@@ -28,19 +28,23 @@
 	include Ezmlm::SpecHelpers
 
 
-	LISTDIR = Pathname.new( 'list' )
+	# Testing constants
+	TEST_LISTDIR               = Pathname.new( 'list' )
+	TEST_LIST_NAME             = 'waffle-lovers'
+	TEST_LIST_HOST             = 'lists.syrup.info'
+	TEST_OWNER                 = 'listowner@rumpus-the-whale.info'
+	TEST_CUSTOM_MODERATORS_DIR = '/foo/bar/clowns'
+	
 	TEST_SUBSCRIBERS = %w[
 		pete.chaffee@toadsmackers.com
 		dolphinzombie@alahalohamorra.com
 		piratebanker@yahoo.com
 	  ]
+
 	TEST_MODERATORS = %w[
 		dolphinzombie@alahalohamorra.com
 	  ]
-	TEST_LIST_NAME = 'waffle-lovers'
-	TEST_LIST_HOST = 'lists.syrup.info'
-	TEST_OWNER = 'listowner@rumpus-the-whale.info'
-	TEST_CUSTOM_MODERATORS_DIR = '/foo/bar/clowns'
+	
 	TEST_CONFIG = <<-"EOF".gsub( /^\t+/, '' )
 		F:-aBCDeFGHijKlMnOpQrStUVWXYZ
 		X:
@@ -60,7 +64,7 @@
 	EOF
 	
 
-	it "can create a new list"
+	it "can create a list"
 	it "can add a new subscriber"
 	it "can remove a current subscriber"
 	it "can edit the list's text files"
@@ -72,7 +76,7 @@
 	describe "list manager functions" do
 		
 		before( :each ) do
-			@listpath = LISTDIR.dup
+			@listpath = TEST_LISTDIR.dup
 			@list = Ezmlm::List.new( @listpath )
 		end
 		
@@ -121,7 +125,7 @@
 
 		
 		it "can return a list of subscribers' email addresses" do
-			subscribers_dir = LISTDIR + 'subscribers'
+			subscribers_dir = TEST_LISTDIR + 'subscribers'
 			
 			expectation = Pathname.should_receive( :glob ).with( subscribers_dir + '*' )
 
@@ -393,7 +397,7 @@
 	describe "archive functions" do
 	
 		before( :each ) do
-			@listpath = LISTDIR.dup
+			@listpath = TEST_LISTDIR.dup
 			@list = Ezmlm::List.new( @listpath )
 		end
 		
@@ -419,7 +423,7 @@
 		
 
 		
-		TEST_ARCHIVE_DIR = LISTDIR + 'archive'
+		TEST_ARCHIVE_DIR = TEST_LISTDIR + 'archive'
 		TEST_ARCHIVE_SUBDIRS = %w[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 ]
 		TEST_POST_FILES = %w[ 00 01 02 03 04 05 06 07 08 09 10 11 12 13 ]