Permalink
Browse files

[tests] register -> identify, updated readme

  • Loading branch information...
1 parent e7f0091 commit 9ecc8b9bd9bc1e2f31838d66f776b1d863b13986 @portertech committed Sep 29, 2012
Showing with 38 additions and 16 deletions.
  1. +32 −10 README.org
  2. +6 −6 test/send_tests.rb
View
@@ -7,36 +7,58 @@
* Usage
: require "carrier-pigeon"
-:
-: # In the open
+
+Send a private message
+
: CarrierPigeon.send(
: :uri => "irc://nick:password@irc.domain.com:6667/#channel",
: :message => "cooooo, coo coo"
: )
-:
-: # SSL
+
+Send a notice
+
+: CarrierPigeon.send(
+: :uri => "irc://nick:password@irc.domain.com:6667/#channel",
+: :message => "cooooo, coo coo",
+: :notice => true
+: )
+
+Use SSL
+
: CarrierPigeon.send(
: :uri => "irc://nick:password@irc.domain.com:6667/#channel",
: :message => "coo, secret plan",
: :ssl => true
: )
-:
-: # Join a channel (required for most Freenode channels)
+
+Join a channel (required for most Freenode channels)
+
: CarrierPigeon.send(
: :uri => "irc://nick:password@irc.domain.com:6667/#channel",
: :message => "cooooo, part of the flock",
: :join => true
: )
-:
-: # Join a channel that requires a password
+
+Join a channel that requires a password
+
: CarrierPigeon.send(
: :uri => "irc://nick:password@irc.domain.com:6667/#channel",
: :message => "coo, the password is ..."
: :channel_password => "secret",
: :join => true
: )
-:
-: # Register (ping reply) prior to joining or messaging a channel (required for some private servers)
+
+Identify with NickServ
+
+: CarrierPigeon.send(
+: :uri => "irc://nick:password@irc.domain.com:6667/#channel",
+: :message => "nickserv, coo coo",
+: :nickserv_password => "secret"
+: )
+
+Register (ping reply) prior to joining or messaging a channel
+(required for some private servers)
+
: CarrierPigeon.send(
: :uri => "irc://nick:password@irc.domain.com:6667/#channel",
: :message => "cooooo, coo coo",
View
@@ -105,22 +105,22 @@
@server_received.must_equal(JOIN_PASSWORD)
end
- it "can require registration and send a private message to an irc channel" do
+ it "can identify with nickserv and send a private message to an irc channel" do
CarrierPigeon.send(
:uri => "irc://foo@localhost:6667/#test",
:message => "test",
- :register_first => true
+ :nickserv_password => "bar"
)
- @server_received.must_equal(REGISTER)
+ @server_received.must_equal(NICKSERV_PASSWORD)
end
- it "can register with nickserv and send a private message to an irc channel" do
+ it "can require registration and send a private message to an irc channel" do
CarrierPigeon.send(
:uri => "irc://foo@localhost:6667/#test",
:message => "test",
- :nickserv_password => "bar"
+ :register_first => true
)
- @server_received.must_equal(NICKSERV_PASSWORD)
+ @server_received.must_equal(REGISTER)
end
it "must be provided an irc uri" do

0 comments on commit 9ecc8b9

Please sign in to comment.