Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
add spec for arguments to original method
Browse files Browse the repository at this point in the history
  • Loading branch information
garybernhardt committed Apr 17, 2011
1 parent 019eab6 commit 5bc68ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 6 additions & 9 deletions spec/do_not_want_spec.rb
@@ -1,17 +1,10 @@
module ActiveRecord
class Base
def update_attribute; end
def save; end
end
end

require 'do_not_want'
require 'gems/fake_gem'

class Walrus
def be_killed_by!(killer)
def be_killed_by!(killer, reason)
die!
"killed by #{killer}"
"killed by #{killer} because #{reason}"
end

def die!
Expand Down Expand Up @@ -41,6 +34,10 @@ def die!
kill_walrus(walrus)
end.not_to raise_error
end

it "passes arguments" do
kill_walrus(walrus).should == 'killed by kitty because kitty is angry'
end
end
end

2 changes: 1 addition & 1 deletion spec/gems/fake_gem.rb
@@ -1,4 +1,4 @@
def kill_walrus(walrus)
walrus.be_killed_by!('kitty')
walrus.be_killed_by!('kitty', 'kitty is angry')
end

0 comments on commit 5bc68ac

Please sign in to comment.