- Remove the runtime dependency on rake-compiler. - Use #rb_str_new instead of #rb_str_new2, the hash character array isn't null terminated. - Add various safeguards for object instantiations. - Remove the 'threaded' options for messages, folding them into 'archived'. If archiving is enabled, so is threading. - Return nil for lookups from the list object instead of raising exceptions. - Open subject indexes with the proper encodings (thanks Michael Granger!) - Allow touching and unlinking files to operate on multiple paths at once, within a single safety() wrap.
59 lines
1 KiB
Ruby
59 lines
1 KiB
Ruby
#!/usr/bin/ruby
|
|
|
|
require 'simplecov' if ENV['COVERAGE']
|
|
require 'rspec'
|
|
require 'fileutils'
|
|
|
|
require_relative '../lib/ezmlm'
|
|
|
|
module SpecHelpers
|
|
include FileUtils
|
|
|
|
TEST_LIST_NAME = 'waffle-lovers'
|
|
TEST_LIST_HOST = 'lists.syrup.info'
|
|
TEST_OWNER = 'listowner@rumpus-the-whale.info'
|
|
|
|
TEST_SUBSCRIBERS = %w[
|
|
pete.chaffee@toadsmackers.com
|
|
dolphinzombie@alahalohamorra.com
|
|
piratebanker@yahoo.com
|
|
]
|
|
|
|
TEST_MODERATORS = %w[
|
|
dolphinzombie@alahalohamorra.com
|
|
]
|
|
|
|
###############
|
|
module_function
|
|
###############
|
|
|
|
### Create a copy of a fresh listdir into /tmp.
|
|
###
|
|
def make_listdir
|
|
dirname = "/tmp/%s.%d.%0.4f" % [
|
|
'ezmlm_list',
|
|
Process.pid,
|
|
(Time.now.to_f % 3600),
|
|
]
|
|
list = Pathname.new( __FILE__ ).dirname + 'data' + 'testlist'
|
|
cp_r( list.to_s, dirname )
|
|
|
|
return dirname
|
|
end
|
|
end
|
|
|
|
|
|
RSpec.configure do |config|
|
|
include SpecHelpers
|
|
|
|
config.run_all_when_everything_filtered = true
|
|
config.filter_run :focus
|
|
config.order = 'random'
|
|
config.mock_with( :rspec ) do |mock|
|
|
mock.syntax = :expect
|
|
end
|
|
|
|
config.include( SpecHelpers )
|
|
end
|
|
|
|
|