Sha256: fb31553ab6f06dfb0cbf2709f1f7fcb177d133a2863169b6dda91d2a1ce72328

Contents?: true

Size: 747 Bytes

Versions: 1

Compression:

Stored size: 747 Bytes

Contents

require 'spec_helper'

describe Config do
  before do
    @config = Feed2Mail::Config.new
  end

  context '#new' do
    it 'has no feed when created' do
      @config.feeds.should be_empty
    end
  end

  context 'attribute storing' do
    it 'stores feed' do
      uri = 'http://example.net/feed.rss'
      @config.feeds << Feed2Mail::Feed.new(uri)
      @config.should have(1).feeds
      @config.feeds.first.uri.should == uri
    end
  end

  context '#load' do
    it 'parses config file' do
      @config.load(File.expand_path(File.dirname(__FILE__) + '/data/config.yaml'))
      @config.feeds[0].uri.should == 'http://example.net/feed.rss'
      @config.feeds[1].uri.should == 'http://example.example.net/other_feed.rss'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
feed2mail-0.0.1 spec/config_spec.rb