Sha256: 6c61fd03176066471f2f9e4395c7857e5cf8560538555d58dfddd3cea785b97e

Contents?: true

Size: 691 Bytes

Versions: 3

Compression:

Stored size: 691 Bytes

Contents

require 'spec_helper'

module Almanack
  describe MeetupGroup do
    describe "#events_between" do
      it "returns a list of events" do
        feed = MeetupGroup.new(group_urlname: 'The-Foundation-Christchurch', key: 'secrettoken')
        events = nil

        Timecop.freeze(2014, 5, 24) do
          VCR.use_cassette('meetup') do
            from = DateTime.now
            to = from + 30
            events = feed.events_between(from..to)
          end
        end

        start_dates = events.map(&:start_date)

        expect(events.length).to eq(5)
        expect(events).to all_have_properties(:title, :start_date, :end_date, :description, :location)
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
almanack-0.0.1.alpha3 spec/meetup_group_spec.rb
almanack-0.0.1.alpha2 spec/meetup_group_spec.rb
almanack-0.0.1.alpha1 spec/meetup_group_spec.rb