Created
May 15, 2010 15:02
-
-
Save bfaloona/402239 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'uwchat' | |
module UWChat | |
class ServerCommand | |
# ... | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'uwchat/server_command' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment