From 8432aa908661bb90618c5e1eec01ed83cfffb288 Mon Sep 17 00:00:00 2001 From: Mike Dvorkin Date: Sat, 6 Nov 2010 15:40:20 -0700 Subject: [PATCH] Changed default method color --- lib/ap/awesome_print.rb | 2 +- spec/methods_spec.rb | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/ap/awesome_print.rb b/lib/ap/awesome_print.rb index 7820769..c2ec0ed 100755 --- a/lib/ap/awesome_print.rb +++ b/lib/ap/awesome_print.rb @@ -30,7 +30,7 @@ class AwesomePrint :symbol => :cyanish, :time => :greenish, :trueclass => :green, - :method => :purple, + :method => :purpleish, :args => :pale } } diff --git a/spec/methods_spec.rb b/spec/methods_spec.rb index 6ba6b67..1362e4d 100644 --- a/spec/methods_spec.rb +++ b/spec/methods_spec.rb @@ -12,7 +12,7 @@ describe "Single method" do it "color: should handle a method with no arguments" do method = ''.method(:upcase) - method.ai.should == "\e[1;33mString\e[0m#\e[1;35mupcase\e[0m\e[0;37m()\e[0m" + method.ai.should == "\e[1;33mString\e[0m#\e[0;35mupcase\e[0m\e[0;37m()\e[0m" end it "plain: should handle a method with one argument" do @@ -22,7 +22,7 @@ describe "Single method" do it "color: should handle a method with one argument" do method = ''.method(:include?) - method.ai.should == "\e[1;33mString\e[0m#\e[1;35minclude?\e[0m\e[0;37m(arg1)\e[0m" + method.ai.should == "\e[1;33mString\e[0m#\e[0;35minclude?\e[0m\e[0;37m(arg1)\e[0m" end it "plain: should handle a method with two arguments" do @@ -32,7 +32,7 @@ describe "Single method" do it "color: should handle a method with two arguments" do method = ''.method(:tr) - method.ai.should == "\e[1;33mString\e[0m#\e[1;35mtr\e[0m\e[0;37m(arg1, arg2)\e[0m" + method.ai.should == "\e[1;33mString\e[0m#\e[0;35mtr\e[0m\e[0;37m(arg1, arg2)\e[0m" end it "plain: should handle a method with multiple arguments" do @@ -42,7 +42,7 @@ describe "Single method" do it "color: should handle a method with multiple arguments" do method = ''.method(:split) - method.ai.should == "\e[1;33mString\e[0m#\e[1;35msplit\e[0m\e[0;37m(*arg1)\e[0m" + method.ai.should == "\e[1;33mString\e[0m#\e[0;35msplit\e[0m\e[0;37m(*arg1)\e[0m" end it "plain: should handle a method defined in mixin" do @@ -52,7 +52,7 @@ describe "Single method" do it "color: should handle a method defined in mixin" do method = ''.method(:is_a?) - method.ai.should == "\e[1;33mString (Kernel)\e[0m#\e[1;35mis_a?\e[0m\e[0;37m(arg1)\e[0m" + method.ai.should == "\e[1;33mString (Kernel)\e[0m#\e[0;35mis_a?\e[0m\e[0;37m(arg1)\e[0m" end it "plain: should handle an unbound method" do @@ -69,9 +69,9 @@ describe "Single method" do end method = Hello.instance_method(:world) if RUBY_VERSION < '1.9.2' - method.ai.should == "\e[1;33mHello (unbound)\e[0m#\e[1;35mworld\e[0m\e[0;37m(arg1, arg2)\e[0m" + method.ai.should == "\e[1;33mHello (unbound)\e[0m#\e[0;35mworld\e[0m\e[0;37m(arg1, arg2)\e[0m" else - method.ai.should == "\e[1;33mHello (unbound)\e[0m#\e[1;35mworld\e[0m\e[0;37m(a, b)\e[0m" + method.ai.should == "\e[1;33mHello (unbound)\e[0m#\e[0;35mworld\e[0m\e[0;37m(a, b)\e[0m" end end end