File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ def self.editor
106106 #
107107 def self . editor = ( editor )
108108 if editor . is_a? Symbol
109- @editor = Editor . for_symbol ( editor )
109+ @editor = Editor . editor_from_symbol ( editor )
110110 raise ( ArgumentError , "Symbol #{ editor } is not a symbol in the list of supported errors." ) unless editor
111111 elsif editor . is_a? String
112112 @editor = Editor . for_formatting_string ( editor )
Original file line number Diff line number Diff line change 44 describe ".editor" do
55 context "when set to a specific value" do
66 before do
7- allow ( BetterErrors ::Editor ) . to receive ( :for_symbol ) . and_return ( :editor_from_symbol )
7+ allow ( BetterErrors ::Editor ) . to receive ( :editor_from_symbol ) . and_return ( :editor_from_symbol )
88 allow ( BetterErrors ::Editor ) . to receive ( :for_formatting_string ) . and_return ( :editor_from_formatting_string )
99 allow ( BetterErrors ::Editor ) . to receive ( :for_proc ) . and_return ( :editor_from_proc )
1010 end
2727 end
2828
2929 context "when the value is a symbol" do
30- it "uses BetterErrors::Editor.for_symbol to set the value" do
30+ it "uses BetterErrors::Editor.editor_from_symbol to set the value" do
3131 subject . editor = :subl
32- expect ( BetterErrors ::Editor ) . to have_received ( :for_symbol ) . with ( :subl )
32+ expect ( BetterErrors ::Editor ) . to have_received ( :editor_from_symbol ) . with ( :subl )
3333 expect ( subject . editor ) . to eq ( :editor_from_symbol )
3434 end
3535 end
You can’t perform that action at this time.
0 commit comments