spec/spec_helper.rb in peekaboo-0.2.1 vs spec/spec_helper.rb in peekaboo-0.3.0

- old
+ new

@@ -9,30 +9,58 @@ require 'peekaboo' Spec::Runner.configure do |config| def new_test_class Class.new do - def method_no_tracing + class << self + def say_hello + 'hello' + end + def hello name + "hello #{name}" + end + def add a, b + a + b + end + def happy? option = true + option + end + def comma_list *args + args.join ',' + end + def kaboom + raise 'fire, fire' + end end - - def method_no_args + + def say_goodbye + 'goodbye' end - - def method_one_arg arg1 + def goodbye name + "goodbye #{name}" end - - def method_two_args arg1, arg2 + def subtract a, b + a - b end - - def method_optional_args optional = 'default' + def sad? option = false + option end - - def method_variable_args *args + def pipe_list *args + args.join '|' end - - def method_raises - raise 'something went wrong' + def crash + raise 'twisted code' end + + ### OLD TEST METHODS ### + + def method_no_tracing;end + def method_no_args;end + def method_one_arg arg1;end + def method_two_args arg1, arg2;end + def method_optional_args optional = 'default';end + def method_variable_args *args;end + def method_raises;raise 'something went wrong';end end end def trace_message contents, offset = 1 file, line, method = CallChain.parse_caller(caller(1).first)