Sha256: bfb1d6a561290e4a23fb21f08296dc40951b0ee3b1a74f350a56f248f96f515a

Contents?: true

Size: 1000 Bytes

Versions: 4

Compression:

Stored size: 1000 Bytes

Contents

require 'spec_helper'
module IcalImporter
  describe SingleEventBuilder do
    subject { SingleEventBuilder.new(event) }
    let(:event) { Icalendar.parse(sample_ics('mn_twins')).first.events.first }
    describe "#build" do
      it "builds an event" do
        new_event = subject.build
        new_event.should be_a LocalEvent
        new_event.title.should == "Spring Training: Tampa Bay 3 - Minnesota 7"
        new_event.utc?.should == false
        new_event.description.should == "Spring Training: Tampa Bay 3 - Minnesota 7\n\nClick below for game previews, wraps and boxscores plus video, tickets, stats, gameday and more!\nhttp://mlb.mlb.com/mlb/gameday/index.jsp?gid=2012_03_03_tbamlb_minmlb_1\n\nWatch or Listen with MLB.TV: http://mlb.mlb.com/schedule/index.jsp?c_id=min&m=03&y=2012\n\nLocal Radio: 1500 ESPN"
        new_event.location.should == "Lee County Sports Complex, Hammond County Stadium, Lee County"
        new_event.all_day_event.should == false
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ical_importer-0.5.1 spec/ical_importer/single_event_builder_spec.rb
ical_importer-0.5.0 spec/ical_importer/single_event_builder_spec.rb
ical_importer-0.4.0 spec/ical_importer/single_event_builder_spec.rb
ical_importer-0.3.0 spec/ical_importer/single_event_builder_spec.rb