Sha256: 51b4e0bddaa1513ae964c4f6da96e2f08efcdcd5a29ea342a72813b95f0a3206

Contents?: true

Size: 929 Bytes

Versions: 12

Compression:

Stored size: 929 Bytes

Contents

require 'spec_helper'

describe EventRevision do
  
  before(:each) do
    @valid_attributes = {
      :name => "value for name",
      :event_type => "Meeting",
      :start_on => Date.today,
      :end_on => Date.today,
      :location => "value for location",
      :description => "value for description"
    }
    @event = Event.create!(@valid_attributes)
    @event.name = 'other value'
    @event.save
    @event_revision = @event.find_revision(:previous)
    
    # pending
    #@contact = mock_model(Contact)
    #Contact.stub(:find).and_return([@contact])
  end
  
  it "should have an attendee collection" do
    pending
    @event_revision.attendees.count.should == 0
  end
  
  it "should instantiate Contacts as attendees" do
    pending
    Contact.should_receive(:find).and_return([@contact])
    @event_revision.attendee_roster = "#{@contact.id}"
    @event_revision.attendees.should == [@contact]
  end  
  
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
event_calendar_engine-0.1.11 spec/models/event_revision_spec.rb
event_calendar_engine-0.1.10 spec/models/event_revision_spec.rb
event_calendar_engine-0.1.9 spec/models/event_revision_spec.rb
event_calendar_engine-0.1.8 spec/models/event_revision_spec.rb
event_calendar_engine-0.1.7 spec/models/event_revision_spec.rb
event_calendar_engine-0.1.6 spec/models/event_revision_spec.rb
event_calendar_engine-0.1.5 spec/models/event_revision_spec.rb
event_calendar_engine-0.1.4 spec/models/event_revision_spec.rb
event_calendar_engine-0.1.3 spec/models/event_revision_spec.rb
event_calendar_engine-0.1.2 spec/models/event_revision_spec.rb
event_calendar_engine-0.1.1 spec/models/event_revision_spec.rb
event_calendar_engine-0.1.0 spec/models/event_revision_spec.rb