Created
October 2, 2010 18:25
-
-
Save carols10cents/607861 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'roster' | |
describe "roster" do | |
before(:each) do | |
@r = Roster.new | |
@r << "Gregory Brown" | |
end | |
it "should update cache the first time" do | |
before_obj_id = @r.object_id | |
@r.to_xml | |
@r.object_id.should_not eql(before_obj_id) | |
end | |
it "should cache if not modified between 1st and 2nd to_xml" do | |
@r.to_xml | |
before_obj_id = @r.object_id | |
@r.to_xml | |
@r.object_id.should eql(before_obj_id) | |
end | |
it "should update cache if modified between 1st and 2nd to_xml" do | |
@r.to_xml | |
@r << "David Black" | |
before_obj_id = @r.object_id | |
@r.to_xml | |
@r.object_id.should_not eql(before_obj_id) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment