Permalink
Browse files

Added a test for untouched method

  • Loading branch information...
1 parent 3769d19 commit 4f7feaddf553600631a9db6241152a92b8250baf @fredwu committed Sep 12, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 spec/ruby_decorators_spec.rb
@@ -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

0 comments on commit 4f7fead

Please sign in to comment.