spec/cinch-karma_spec.rb in cinch-karma-1.0.0 vs spec/cinch-karma_spec.rb in cinch-karma-1.0.1

- old
+ new

@@ -7,66 +7,66 @@ @bot = make_bot(Cinch::Plugins::Karma, { :filename => '/dev/null' }) end it 'should default to zero karma' do msg = make_message(@bot, '!karma foo', { :channel => '#foo' }) - get_replies(msg).first.should == "Karma for foo is 0" + get_replies(msg).first.text.should == "Karma for foo is 0" end it 'should allow users to add karma' do msg = make_message(@bot, 'foo++', { :channel => '#foo' }) get_replies(msg) msg = make_message(@bot, '!karma foo', { :channel => '#foo' }) - get_replies(msg).first.should == "Karma for foo is 1" + get_replies(msg).first.text.should == "Karma for foo is 1" end it 'should allow users to add karma mid message' do msg = make_message(@bot, 'd asd asdasd foo++ dasdasd sadasd sad', { :channel => '#foo' }) get_replies(msg) msg = make_message(@bot, '!karma foo', { :channel => '#foo' }) - get_replies(msg).first.should == "Karma for foo is 1" + get_replies(msg).first.text.should == "Karma for foo is 1" end it 'should allow users to add karma with items with spaces via ()' do msg = make_message(@bot, '(foo bar)++', { :channel => '#foo' }) get_replies(msg) msg = make_message(@bot, '!karma foo bar', { :channel => '#foo' }) - get_replies(msg).first.should == "Karma for foo bar is 1" + get_replies(msg).first.text.should == "Karma for foo bar is 1" end it 'should allow users to remove karma' do msg = make_message(@bot, 'foo--', { :channel => '#foo' }) get_replies(msg) msg = make_message(@bot, '!karma foo', { :channel => '#foo' }) - get_replies(msg).first.should == "Karma for foo is -1" + get_replies(msg).first.text.should == "Karma for foo is -1" end it 'should allow users to remove karma mid message' do msg = make_message(@bot, 'd asd asdasd foo-- dasdasd sadasd sad', { :channel => '#foo' }) get_replies(msg) msg = make_message(@bot, '!karma foo', { :channel => '#foo' }) - get_replies(msg).first.should == "Karma for foo is -1" + get_replies(msg).first.text.should == "Karma for foo is -1" end it 'should allow users to remove karma with items with spaces via ()' do msg = make_message(@bot, '(foo bar)--', { :channel => '#foo' }) get_replies(msg) msg = make_message(@bot, '!karma foo bar', { :channel => '#foo' }) - get_replies(msg).first.should == "Karma for foo bar is -1" + get_replies(msg).first.text.should == "Karma for foo bar is -1" end it 'should not allow users to check karam via pm' do msg = make_message(@bot, '!karma foo') - get_replies(msg).first.should == "You must use that command in the main channel." + get_replies(msg).first.text.should == "You must use that command in the main channel." end it 'should not allow users to add karma via pm' do msg = make_message(@bot, 'foo++') msg = make_message(@bot, '!karma foo', { :channel => '#foo' }) - get_replies(msg).first.should == "Karma for foo is 0" + get_replies(msg).first.text.should == "Karma for foo is 0" end it 'should not allow users to remove karma via pm' do msg = make_message(@bot, 'foo--') msg = make_message(@bot, '!karma foo', { :channel => '#foo' }) - get_replies(msg).first.should == "Karma for foo is 0" + get_replies(msg).first.text.should == "Karma for foo is 0" end end