Skip to content

Instantly share code, notes, and snippets.

@badosu
Last active December 17, 2015 13:29
Show Gist options
  • Save badosu/5618037 to your computer and use it in GitHub Desktop.
Save badosu/5618037 to your computer and use it in GitHub Desktop.
describe "taking |a, *b| arguments" do
it "raises an TypeError if #to_ary raises an error" do
obj = mock("block yield to_ary raising an error")
obj.should_receive(:to_ary).and_raise(StandardError)
lambda { @y.s(obj) { |a, *b| } }.should raise_error(TypeError)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment