Sha256: bcec0cac6ee2a1f3c5f207cd6953e21829954dad59d36ca78deaa3fc49c748b7

Contents?: true

Size: 525 Bytes

Versions: 9

Compression:

Stored size: 525 Bytes

Contents

require "spec_helper"

describe MailCannon::Stamp do
  describe "#event" do
    let(:stamp) { build(:stamp, code: 7) }
    it "returns an Event" do
      expect(stamp.event).to be(MailCannon::Event::Spam)
    end
  end
  describe "#from_code" do
    it "returns a Stamp with appropriate code" do
      expect do
        MailCannon::Event::EVENTS.each_with_index do |e,i|
          raise 'Not a Stamp!' unless MailCannon::Stamp.from_code(i).is_a?(MailCannon::Stamp)
        end
      end.not_to raise_error
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mailcannon-0.1.1 spec/mailcannon/stamp_spec.rb
mailcannon-0.1.0.pre.1 spec/mailcannon/stamp_spec.rb
mailcannon-0.0.8.pre.1 spec/mailcannon/stamp_spec.rb
mailcannon-0.0.8 spec/mailcannon/stamp_spec.rb
mailcannon-0.0.6 spec/mailcannon/stamp_spec.rb
mailcannon-0.0.5 spec/mailcannon/stamp_spec.rb
mailcannon-0.0.4 spec/mailcannon/stamp_spec.rb
mailcannon-0.0.3 spec/mailcannon/stamp_spec.rb
mailcannon-0.0.2 spec/mailcannon/stamp_spec.rb