Skip to content

Instantly share code, notes, and snippets.

@marcandre
Created March 4, 2013 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcandre/5084673 to your computer and use it in GitHub Desktop.
Save marcandre/5084673 to your computer and use it in GitHub Desktop.
# Change:
ruby_version_is '' ... '1.9' do
it "raises a TypeError on a frozen array" do
lambda { ArraySpecs.frozen_array << 5 }.should raise_error(TypeError)
end
end
ruby_version_is '1.9' do
it "raises a RuntimeError on a frozen array" do
lambda { ArraySpecs.frozen_array << 5 }.should raise_error(RuntimeError)
end
end
# To:
it "raises the appropriate error on a frozen array" do
lambda { ArraySpecs.frozen_array << 5 }.should raise_error(mutating_frozen_object_error)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment