Skip to content

Commit b5f8c41

Browse files
committed
Update rspec dependency to >= 3
1 parent 7365712 commit b5f8c41

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ group :test do
1919
# needs to be < 2.0 to work with Ruby 1.8.7
2020
gem "mime-types", "~> 1.25", :platforms => [:jruby, :ruby_18]
2121
gem "fakeweb", ">= 1.3"
22-
gem "rspec", ">= 2.14"
23-
gem "rspec-mocks", ">= 2.12.2"
22+
gem "rspec", ">= 3"
23+
gem "rspec-mocks", ">= 3"
2424
gem "rubocop", ">= 0.19", :platforms => [:ruby_19, :ruby_20, :ruby_21]
2525
gem "simplecov", :require => false
2626
end

spec/command_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def command(options = {})
5858
describe "#run" do
5959
it "runs a command by calling a method in the given instance" do
6060
dub = double
61-
expect(dub).to receive(:can_has).and_return { |*args| args }
61+
expect(dub).to receive(:can_has) { |*args| args }
6262
expect(command.run(dub, [1, 2, 3])).to eq([1, 2, 3])
6363
end
6464

spec/quality_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def check_for_extra_spaces(filename)
3939
end
4040

4141
RSpec::Matchers.define :be_well_formed do
42-
failure_message_for_should do |actual|
42+
failure_message do |actual|
4343
actual.join("\n")
4444
end
4545

spec/shell/basic_spec.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,34 +68,34 @@ def shell
6868
describe "#yes?" do
6969
it "asks the user and returns true if the user replies yes" do
7070
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
7272
end
7373

7474
it "asks the user and returns false if the user replies no" do
7575
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
7777
end
7878

7979
it "asks the user and returns false if the user replies with an answer other than yes or no" do
8080
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
8282
end
8383
end
8484

8585
describe "#no?" do
8686
it "asks the user and returns true if the user replies no" do
8787
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
8989
end
9090

9191
it "asks the user and returns false if the user replies yes" do
9292
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
9494
end
9595

9696
it "asks the user and returns false if the user replies with an answer other than yes or no" do
9797
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
9999
end
100100
end
101101

@@ -283,17 +283,17 @@ def #456 Lanç...
283283

284284
it "returns true if the user chooses default option" do
285285
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
287287
end
288288

289289
it "returns false if the user chooses no" do
290290
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
292292
end
293293

294294
it "returns true if the user chooses yes" do
295295
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
297297
end
298298

299299
it "shows help usage if the user chooses help" do

0 commit comments

Comments
 (0)