parent
e2708a9195
commit
20b04f05d1
@ -1,104 +0,0 @@
|
||||
From b5f8c410da4ad315a8c45a91fdcd9a4a2cb57d7d Mon Sep 17 00:00:00 2001
|
||||
From: Erik Michaels-Ober <sferik@gmail.com>
|
||||
Date: Mon, 9 Jun 2014 12:01:27 +0200
|
||||
Subject: [PATCH] Update rspec dependency to >= 3
|
||||
|
||||
---
|
||||
Gemfile | 4 ++--
|
||||
spec/command_spec.rb | 2 +-
|
||||
spec/quality_spec.rb | 2 +-
|
||||
spec/shell/basic_spec.rb | 18 +++++++++---------
|
||||
4 files changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/spec/command_spec.rb b/spec/command_spec.rb
|
||||
index b09270d..6e5ad2c 100644
|
||||
--- a/spec/command_spec.rb
|
||||
+++ b/spec/command_spec.rb
|
||||
@@ -58,7 +58,7 @@ def command(options = {})
|
||||
describe "#run" do
|
||||
it "runs a command by calling a method in the given instance" do
|
||||
dub = double
|
||||
- expect(dub).to receive(:can_has).and_return { |*args| args }
|
||||
+ expect(dub).to receive(:can_has) { |*args| args }
|
||||
expect(command.run(dub, [1, 2, 3])).to eq([1, 2, 3])
|
||||
end
|
||||
|
||||
diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb
|
||||
index 94f5100..6fa2798 100644
|
||||
--- a/spec/quality_spec.rb
|
||||
+++ b/spec/quality_spec.rb
|
||||
@@ -39,7 +39,7 @@ def check_for_extra_spaces(filename)
|
||||
end
|
||||
|
||||
RSpec::Matchers.define :be_well_formed do
|
||||
- failure_message_for_should do |actual|
|
||||
+ failure_message do |actual|
|
||||
actual.join("\n")
|
||||
end
|
||||
|
||||
diff --git a/spec/shell/basic_spec.rb b/spec/shell/basic_spec.rb
|
||||
index 417f371..0ca8cf1 100644
|
||||
--- a/spec/shell/basic_spec.rb
|
||||
+++ b/spec/shell/basic_spec.rb
|
||||
@@ -68,34 +68,34 @@ def shell
|
||||
describe "#yes?" do
|
||||
it "asks the user and returns true if the user replies yes" do
|
||||
expect(Thor::LineEditor).to receive(:readline).with("Should I overwrite it? ", :add_to_history => false).and_return("y")
|
||||
- expect(shell.yes?("Should I overwrite it?")).to be_true
|
||||
+ expect(shell.yes?("Should I overwrite it?")).to be true
|
||||
end
|
||||
|
||||
it "asks the user and returns false if the user replies no" do
|
||||
expect(Thor::LineEditor).to receive(:readline).with("Should I overwrite it? ", :add_to_history => false).and_return("n")
|
||||
- expect(shell.yes?("Should I overwrite it?")).not_to be_true
|
||||
+ expect(shell.yes?("Should I overwrite it?")).not_to be true
|
||||
end
|
||||
|
||||
it "asks the user and returns false if the user replies with an answer other than yes or no" do
|
||||
expect(Thor::LineEditor).to receive(:readline).with("Should I overwrite it? ", :add_to_history => false).and_return("foobar")
|
||||
- expect(shell.yes?("Should I overwrite it?")).to be_false
|
||||
+ expect(shell.yes?("Should I overwrite it?")).to be false
|
||||
end
|
||||
end
|
||||
|
||||
describe "#no?" do
|
||||
it "asks the user and returns true if the user replies no" do
|
||||
expect(Thor::LineEditor).to receive(:readline).with("Should I overwrite it? ", :add_to_history => false).and_return("n")
|
||||
- expect(shell.no?("Should I overwrite it?")).to be_true
|
||||
+ expect(shell.no?("Should I overwrite it?")).to be true
|
||||
end
|
||||
|
||||
it "asks the user and returns false if the user replies yes" do
|
||||
expect(Thor::LineEditor).to receive(:readline).with("Should I overwrite it? ", :add_to_history => false).and_return("Yes")
|
||||
- expect(shell.no?("Should I overwrite it?")).to be_false
|
||||
+ expect(shell.no?("Should I overwrite it?")).to be false
|
||||
end
|
||||
|
||||
it "asks the user and returns false if the user replies with an answer other than yes or no" do
|
||||
expect(Thor::LineEditor).to receive(:readline).with("Should I overwrite it? ", :add_to_history => false).and_return("foobar")
|
||||
- expect(shell.no?("Should I overwrite it?")).to be_false
|
||||
+ expect(shell.no?("Should I overwrite it?")).to be false
|
||||
end
|
||||
end
|
||||
|
||||
@@ -283,17 +283,17 @@ def #456 Lanç...
|
||||
|
||||
it "returns true if the user chooses default option" do
|
||||
expect(Thor::LineEditor).to receive(:readline).and_return("")
|
||||
- expect(shell.file_collision("foo")).to be_true
|
||||
+ expect(shell.file_collision("foo")).to be true
|
||||
end
|
||||
|
||||
it "returns false if the user chooses no" do
|
||||
expect(Thor::LineEditor).to receive(:readline).and_return("n")
|
||||
- expect(shell.file_collision("foo")).to be_false
|
||||
+ expect(shell.file_collision("foo")).to be false
|
||||
end
|
||||
|
||||
it "returns true if the user chooses yes" do
|
||||
expect(Thor::LineEditor).to receive(:readline).and_return("y")
|
||||
- expect(shell.file_collision("foo")).to be_true
|
||||
+ expect(shell.file_collision("foo")).to be true
|
||||
end
|
||||
|
||||
it "shows help usage if the user chooses help" do
|
@ -1 +1,2 @@
|
||||
d775969c49fec36377b918725aa33019 thor-0.19.1.gem
|
||||
SHA512 (thor-0.20.3-spec.tar.gz) = e180f8644376eca2a6e13265a5e6cc43e1813a43d3c00d7e46382193ce8f967e9e44b0d6245d278963ea61ca3e97c289054ea411b8ff916a9f82a9e28bab5b51
|
||||
SHA512 (thor-0.20.3.gem) = 4c834408321f4f13b4878ee0e57a1fcd9a2294faf6d4c8c52ed909c2f14634b7810e3a0bffa1920f37ccd7baced2ff103a06f679f653a133bd647ac1e9add522
|
||||
|
Loading…
Reference in new issue