Skip to content

Instantly share code, notes, and snippets.

@JonRowe
Created May 24, 2013 10:27
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 JonRowe/5642612 to your computer and use it in GitHub Desktop.
Save JonRowe/5642612 to your computer and use it in GitHub Desktop.
lass One
2 def original arg
3 2
4 end
5 end
6
7 describe "one" do
8 it 'does things' do
9 one = One.new
10 one.stub(:original) do |arg|
11 if arg == 1
12 @implementation.call arg
13 else
14 1
15 end
16 end.and_call_original
17 one.original(1).should == 2
18 end
19 end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment