@@ -68,34 +68,34 @@ def shell
68
68
describe "#yes?" do
69
69
it "asks the user and returns true if the user replies yes" do
70
70
expect ( Thor ::LineEditor ) . to receive ( :readline ) . with ( "Should I overwrite it? " , :add_to_history => false ) . and_return ( "y" )
71
- expect ( shell . yes? ( "Should I overwrite it?" ) ) . to be_true
71
+ expect ( shell . yes? ( "Should I overwrite it?" ) ) . to be true
72
72
end
73
73
74
74
it "asks the user and returns false if the user replies no" do
75
75
expect ( Thor ::LineEditor ) . to receive ( :readline ) . with ( "Should I overwrite it? " , :add_to_history => false ) . and_return ( "n" )
76
- expect ( shell . yes? ( "Should I overwrite it?" ) ) . not_to be_true
76
+ expect ( shell . yes? ( "Should I overwrite it?" ) ) . not_to be true
77
77
end
78
78
79
79
it "asks the user and returns false if the user replies with an answer other than yes or no" do
80
80
expect ( Thor ::LineEditor ) . to receive ( :readline ) . with ( "Should I overwrite it? " , :add_to_history => false ) . and_return ( "foobar" )
81
- expect ( shell . yes? ( "Should I overwrite it?" ) ) . to be_false
81
+ expect ( shell . yes? ( "Should I overwrite it?" ) ) . to be false
82
82
end
83
83
end
84
84
85
85
describe "#no?" do
86
86
it "asks the user and returns true if the user replies no" do
87
87
expect ( Thor ::LineEditor ) . to receive ( :readline ) . with ( "Should I overwrite it? " , :add_to_history => false ) . and_return ( "n" )
88
- expect ( shell . no? ( "Should I overwrite it?" ) ) . to be_true
88
+ expect ( shell . no? ( "Should I overwrite it?" ) ) . to be true
89
89
end
90
90
91
91
it "asks the user and returns false if the user replies yes" do
92
92
expect ( Thor ::LineEditor ) . to receive ( :readline ) . with ( "Should I overwrite it? " , :add_to_history => false ) . and_return ( "Yes" )
93
- expect ( shell . no? ( "Should I overwrite it?" ) ) . to be_false
93
+ expect ( shell . no? ( "Should I overwrite it?" ) ) . to be false
94
94
end
95
95
96
96
it "asks the user and returns false if the user replies with an answer other than yes or no" do
97
97
expect ( Thor ::LineEditor ) . to receive ( :readline ) . with ( "Should I overwrite it? " , :add_to_history => false ) . and_return ( "foobar" )
98
- expect ( shell . no? ( "Should I overwrite it?" ) ) . to be_false
98
+ expect ( shell . no? ( "Should I overwrite it?" ) ) . to be false
99
99
end
100
100
end
101
101
@@ -283,17 +283,17 @@ def #456 Lanç...
283
283
284
284
it "returns true if the user chooses default option" do
285
285
expect ( Thor ::LineEditor ) . to receive ( :readline ) . and_return ( "" )
286
- expect ( shell . file_collision ( "foo" ) ) . to be_true
286
+ expect ( shell . file_collision ( "foo" ) ) . to be true
287
287
end
288
288
289
289
it "returns false if the user chooses no" do
290
290
expect ( Thor ::LineEditor ) . to receive ( :readline ) . and_return ( "n" )
291
- expect ( shell . file_collision ( "foo" ) ) . to be_false
291
+ expect ( shell . file_collision ( "foo" ) ) . to be false
292
292
end
293
293
294
294
it "returns true if the user chooses yes" do
295
295
expect ( Thor ::LineEditor ) . to receive ( :readline ) . and_return ( "y" )
296
- expect ( shell . file_collision ( "foo" ) ) . to be_true
296
+ expect ( shell . file_collision ( "foo" ) ) . to be true
297
297
end
298
298
299
299
it "shows help usage if the user chooses help" do
0 commit comments