Skip to content

Instantly share code, notes, and snippets.

@bfaloona
Created May 15, 2010 15:02
Show Gist options
  • Save bfaloona/402239 to your computer and use it in GitHub Desktop.
Save bfaloona/402239 to your computer and use it in GitHub Desktop.
module UWChat
class Server
# ...
# load commands located in lib/uwchat/commands
def load_commands
# need to make this recurse the directory instead of loading one file
load File.join( File.dirname(__FILE__), 'commands/quit_command.rb' )
end
end
end
require 'uwchat'
module UWChat
class ServerCommand
# ...
end
end
require 'uwchat'
describe UWChat::ServerCommand do
describe "Class Structure" do
it "should have required elements" do
UWChat::ServerCommand.should be_true
class TestCommand < UWChat::ServerCommand; end
TestCommand.respond_to?( :when_run ).should be_true
TestCommand.respond_to?( :command ).should be_true
TestCommand.respond_to?( :description ).should be_true
end
end
end
require 'uwchat/server_command'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment