Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Actually return the right topic created time.

  • Loading branch information...
commit 12dbc52ca7ace6cffcb1ec8326f9edfacf0c2de5 1 parent 3a3f67f
@david authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/minibot/commands.rb
  2. +1 −1  spec/commands_spec.rb
View
2  lib/minibot/commands.rb
@@ -22,7 +22,7 @@ def topic(channel)
end
end
- [ topic[1].chomp, meta[1].chomp, Time.at(meta[1].chomp.to_i) ]
+ [ topic[1].chomp, meta[1].chomp, Time.at(meta[2].chomp.to_i) ]
end
private
View
2  spec/commands_spec.rb
@@ -29,7 +29,7 @@ class CommandBot
bot.should_receive(:write).with("TOPIC #datamapper")
bot.stub!(:read_commands)
bot.stub!(:commands).and_return(commands)
- Time.should_receive(:at).and_return("whoa")
+ Time.should_receive(:at).with(1212697142).and_return("whoa")
topic, author, time = bot.topic "#datamapper"
topic.should == "Documentation! http://datamapper.rubyforge.org/"
Please sign in to comment.
Something went wrong with that request. Please try again.