Sha256: eafffa0f2eab2455bd6c9a03e806d45c1b2742f928476c688c284e641ff9afc5

Contents?: true

Size: 674 Bytes

Versions: 2

Compression:

Stored size: 674 Bytes

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'myna_bird'
require 'rspec'

module ShouldAndShouldNotConvert
  def it_should_convert(from, to_hash)
    to = to_hash[:to]    
    it "should convert '#{from}' to '#{to}'" do
      MynaBird.convert(from).should == to
    end
  end
  
  def it_should_not_convert(from)
    it "should raise MalformedEmailException when attempting to convert '#{from}'" do
      lambda {
        MynaBird.convert(from)
      }.should raise_error(MynaBird::MalformedEmailException)
    end
  end
end

RSpec.configure do |config|
  config.extend(ShouldAndShouldNotConvert)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
myna_bird-0.2.11 spec/spec_helper.rb
myna_bird-0.2.9 spec/spec_helper.rb