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
106
106
#
107
107
def self . editor = ( editor )
108
108
if editor . is_a? Symbol
109
- @editor = Editor . for_symbol ( editor )
109
+ @editor = Editor . editor_from_symbol ( editor )
110
110
raise ( ArgumentError , "Symbol #{ editor } is not a symbol in the list of supported errors." ) unless editor
111
111
elsif editor . is_a? String
112
112
@editor = Editor . for_formatting_string ( editor )
Original file line number Diff line number Diff line change 4
4
describe ".editor" do
5
5
context "when set to a specific value" do
6
6
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 )
8
8
allow ( BetterErrors ::Editor ) . to receive ( :for_formatting_string ) . and_return ( :editor_from_formatting_string )
9
9
allow ( BetterErrors ::Editor ) . to receive ( :for_proc ) . and_return ( :editor_from_proc )
10
10
end
27
27
end
28
28
29
29
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
31
31
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 )
33
33
expect ( subject . editor ) . to eq ( :editor_from_symbol )
34
34
end
35
35
end
You can’t perform that action at this time.
0 commit comments