Sha256: 1acdb78355394296044b1b836e05979df7d301b4522ad6904eee319eea06866e

Contents?: true

Size: 580 Bytes

Versions: 3

Compression:

Stored size: 580 Bytes

Contents

require 'spec_helper'

module Almanack
  describe SimpleEventCollection do
    describe "#events_between" do
      it "returns events between two dates" do
        basic_events = SimpleEventCollection.new [
          { title: "Soul Cake Tuesday" },
          { title: "Hogswatch" }
        ]

        from = DateTime.now
        to = from + 30

        events = basic_events.events_between(from..to)

        expect(events.size).to eq(2)
        expect(events.first.title).to eq("Soul Cake Tuesday")
        expect(events.last.title).to eq("Hogswatch")
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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