Skip to content

Instantly share code, notes, and snippets.

@adonaldson
Forked from thechrisoshow/gist:179783
Created September 2, 2009 15:56
Show Gist options
  • Save adonaldson/179786 to your computer and use it in GitHub Desktop.
Save adonaldson/179786 to your computer and use it in GitHub Desktop.
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Event do
it "should be refillable if the event is floating and not complete" do
event = Event.new(:complete => false)
event.stub!(:floating?).and_return true
event.should be_refillable
end
it "should not be refillable if the event is not floating and not complete" do
event = Event.new(:complete => true)
event.stub!(:floating?).and_return false
event.should_not be_refillable
end
it "should not be refillable if the event is floating and complete" do
event = Event.new(:complete => true)
event.stub!(:floating?).and_return true
event.should_not be_refillable
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment