Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a test for untouched method

  • Loading branch information...
commit 4f7feaddf553600631a9db6241152a92b8250baf 1 parent 3769d19
Fred Wu authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 spec/ruby_decorators_spec.rb
8 spec/ruby_decorators_spec.rb
View
@@ -44,6 +44,10 @@ def hello_void
@greeting
end
+ def hello_untouched
+ @greeting
+ end
+
+Batman
def hello_with_args(arg1, arg2)
"#{@greeting} #{arg1} #{arg2}"
@@ -107,6 +111,10 @@ def hello_private
it "decorates a method with a block" do
subject.hello_with_block('how are', 'you') { 'man?' }.must_equal 'hello batman how are you man?'
end
+
+ it "ignores undecorated methods" do
+ subject.hello_untouched.must_equal 'hello world'
+ end
end
describe "a decorator with args" do
Please sign in to comment.
Something went wrong with that request. Please try again.