Sha256: 97e21da4357e105ef5f17a5ffd05fed54560af82a11a969ad72f53bbb2e6eca8

Contents?: true

Size: 599 Bytes

Versions: 3

Compression:

Stored size: 599 Bytes

Contents

require 'spec_helper'

describe Cinch::Plugins::Magic do

  include Cinch::Test

  before(:each) do
    @bot = make_bot(Cinch::Plugins::Magic)
  end

  it 'should allow users to lookup cards' do
    get_replies(make_message(@bot, '!mtg forest')).first.text.
      should include "[Magic] Forest [Basic Land, Forest] - ({T}: Add {G} to your mana pool.)"
  end

  it 'should return an error when a card is not found' do
    get_replies(make_message(@bot, '!mtg random string that is probably not a real card')).first.text.
      should == '[Magic] Card not found, or problem fetching page.'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cinch-magic-1.0.3 spec/cinch-magic_spec.rb
cinch-magic-1.0.2 spec/cinch-magic_spec.rb
cinch-magic-1.0.1 spec/cinch-magic_spec.rb