Skip to content

Commit

Permalink
Actually return the right topic created time.
Browse files Browse the repository at this point in the history
  • Loading branch information
david committed Jun 19, 2008
1 parent 3a3f67f commit 12dbc52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/minibot/commands.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/commands_spec.rb
Expand Up @@ -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/"
Expand Down

0 comments on commit 12dbc52

Please sign in to comment.