Skip to content

Commit

Permalink
Replace be_false with be false
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Nov 9, 2013
1 parent 679292d commit a2cb2aa
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 32 deletions.
10 changes: 5 additions & 5 deletions spec/actions/create_file_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def silence!
it "does not create a file if pretending" do
create_file("doc/config.rb", {}, :pretend => true)
invoke!
expect(File.exists?(File.join(destination_root, "doc/config.rb"))).to be_false
expect(File.exists?(File.join(destination_root, "doc/config.rb"))).to be false
end

it "shows created status to the user" do
Expand Down Expand Up @@ -140,20 +140,20 @@ def silence!
create_file("doc/config.rb")
invoke!
revoke!
expect(File.exists?(@action.destination)).to be_false
expect(File.exists?(@action.destination)).to be false
end

it "does not raise an error if the file does not exist" do
create_file("doc/config.rb")
revoke!
expect(File.exists?(@action.destination)).to be_false
expect(File.exists?(@action.destination)).to be false
end
end

describe "#exists?" do
it "returns true if the destination file exists" do
create_file("doc/config.rb")
expect(@action.exists?).to be_false
expect(@action.exists?).to be false
invoke!
expect(@action.exists?).to be_true
end
Expand All @@ -162,7 +162,7 @@ def silence!
describe "#identical?" do
it "returns true if the destination file exists and is identical" do
create_file("doc/config.rb")
expect(@action.identical?).to be_false
expect(@action.identical?).to be false
invoke!
expect(@action.identical?).to be_true
end
Expand Down
8 changes: 4 additions & 4 deletions spec/actions/create_link_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def silence!
invoke!
destination_path = @hardlink_to
expect(File.exists?(destination_path)).to be_true
expect(File.symlink?(destination_path)).to be_false
expect(File.symlink?(destination_path)).to be false
end

it "creates a symbolic link by default" do
Expand All @@ -59,7 +59,7 @@ def silence!
it "does not create a link if pretending" do
create_link("doc/config.rb", {}, :pretend => true)
invoke!
expect(File.exists?(File.join(destination_root, "doc/config.rb"))).to be_false
expect(File.exists?(File.join(destination_root, "doc/config.rb"))).to be false
end

it "shows created status to the user" do
Expand All @@ -77,7 +77,7 @@ def silence!
describe "#identical?" do
it "returns true if the destination link exists and is identical" do
create_link("doc/config.rb")
expect(@action.identical?).to be_false
expect(@action.identical?).to be false
invoke!
expect(@action.identical?).to be_true
end
Expand All @@ -89,7 +89,7 @@ def silence!
invoke!
File.delete(@tempfile.path)
revoke!
expect(File.symlink?(@action.destination)).to be_false
expect(File.symlink?(@action.destination)).to be false
end
end
end
18 changes: 9 additions & 9 deletions spec/actions/directory_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def exists_and_identical?(source_path, destination_path)

it "does not create a directory in pretend mode" do
invoke! "doc", "ghost", :pretend => true
expect(File.exists?("ghost")).to be_false
expect(File.exists?("ghost")).to be false
end

it "copies the whole directory recursively to the default destination" do
Expand All @@ -62,16 +62,16 @@ def exists_and_identical?(source_path, destination_path)
expect(File.exists?(file)).to be_true

file = File.join(destination_root, "commands", "doc")
expect(File.exists?(file)).to be_false
expect(File.exists?(file)).to be false

file = File.join(destination_root, "commands", "doc", "README")
expect(File.exists?(file)).to be_false
expect(File.exists?(file)).to be false
end

it "ignores files within excluding/ directories when exclude_pattern is provided" do
invoke! "doc", "docs", :exclude_pattern => /excluding\//
file = File.join(destination_root, "docs", "excluding", "rdoc.rb")
expect(File.exists?(file)).to be_false
expect(File.exists?(file)).to be false
end

it "copies and evaluates files within excluding/ directory when no exclude_pattern is present" do
Expand Down Expand Up @@ -112,7 +112,7 @@ def exists_and_identical?(source_path, destination_path)
it "does not copy .empty_directory files" do
invoke! "doc", "docs"
file = File.join(destination_root, "docs", "components", ".empty_directory")
expect(File.exists?(file)).to be_false
expect(File.exists?(file)).to be false
end

it "copies directories even if they are empty" do
Expand Down Expand Up @@ -153,17 +153,17 @@ def exists_and_identical?(source_path, destination_path)
invoke! "doc"
revoke! "doc"

expect(File.exists?(File.join(destination_root, "doc", "README"))).to be_false
expect(File.exists?(File.join(destination_root, "doc", "config.rb"))).to be_false
expect(File.exists?(File.join(destination_root, "doc", "components"))).to be_false
expect(File.exists?(File.join(destination_root, "doc", "README"))).to be false
expect(File.exists?(File.join(destination_root, "doc", "config.rb"))).to be false
expect(File.exists?(File.join(destination_root, "doc", "components"))).to be false
end

it "works with glob characters in the path" do
invoke! "app{1}"
expect(File.exists?(File.join(destination_root, "app{1}", "README"))).to be_true

revoke! "app{1}"
expect(File.exists?(File.join(destination_root, "app{1}", "README"))).to be_false
expect(File.exists?(File.join(destination_root, "app{1}", "README"))).to be false
end
end
end
6 changes: 3 additions & 3 deletions spec/actions/empty_directory_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def base
base.inside("foo", :pretend => true) do
empty_directory("ghost")
end
expect(File.exists?(File.join(base.destination_root, "ghost"))).to be_false
expect(File.exists?(File.join(base.destination_root, "ghost"))).to be false
end

describe "when directory exists" do
Expand All @@ -83,14 +83,14 @@ def base
empty_directory("doc")
invoke!
revoke!
expect(File.exists?(@action.destination)).to be_false
expect(File.exists?(@action.destination)).to be false
end
end

describe "#exists?" do
it "returns true if the destination file exists" do
empty_directory("doc")
expect(@action.exists?).to be_false
expect(@action.exists?).to be false
invoke!
expect(@action.exists?).to be_true
end
Expand Down
4 changes: 2 additions & 2 deletions spec/actions/file_manipulation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,12 @@ def file
describe "#remove_file" do
it "removes the file given" do
action :remove_file, "doc/README"
expect(File.exists?(file)).to be_false
expect(File.exists?(file)).to be false
end

it "removes directories too" do
action :remove_dir, "doc"
expect(File.exists?(File.join(destination_root, "doc"))).to be_false
expect(File.exists?(File.join(destination_root, "doc"))).to be false
end

it "does not remove if pretending" do
Expand Down
2 changes: 1 addition & 1 deletion spec/actions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def file
describe "when pretending" do
it "no directories should be created" do
runner.inside("bar", :pretend => true) {}
expect(File.exists?("bar")).to be_false
expect(File.exists?("bar")).to be false
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def hello
end

it "does not create an accessor for it" do
expect(BrokenCounter.start(["1", "2", "--third", "3"])[3]).to be_false
expect(BrokenCounter.start(["1", "2", "--third", "3"])[3]).to be false
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/core_ext/hash_with_indifferent_access_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
it "handles magic boolean predicates" do
expect(@hash.force?).to be_true
expect(@hash.foo?).to be_true
expect(@hash.nothing?).to be_false
expect(@hash.nothing?).to be false
end

it "handles magic comparisons" do
expect(@hash.foo?('bar')).to be_true
expect(@hash.foo?('bee')).to be_false
expect(@hash.foo?('bee')).to be false
end

it "maps methods to keys" do
Expand Down
2 changes: 1 addition & 1 deletion spec/invocation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

it "invokes a command with arguments" do
expect(A.new.invoke(:five, [5])).to be_true
expect(A.new.invoke(:five, [7])).to be_false
expect(A.new.invoke(:five, [7])).to be false
end

it "invokes the default command if none is given to a Thor class" do
Expand Down
4 changes: 2 additions & 2 deletions spec/shell/basic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def shell

expect($stdout).to receive(:print).with("Should I overwrite it? ")
expect($stdin).to receive(:gets).and_return('Yes')
expect(shell.no?("Should I overwrite it?")).to be_false
expect(shell.no?("Should I overwrite it?")).to be false
end
end

Expand Down Expand Up @@ -274,7 +274,7 @@ def #456 Lanç...
it "returns false if the user chooses no" do
allow($stdout).to receive(:print)
expect($stdin).to receive(:gets).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
Expand Down
4 changes: 2 additions & 2 deletions spec/thor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def boring(*args)
it "affects all specified commands" do
expect(klass.stop_on_unknown_option?(double(:name => "foo"))).to be_true
expect(klass.stop_on_unknown_option?(double(:name => "bar"))).to be_true
expect(klass.stop_on_unknown_option?(double(:name => "baz"))).to be_false
expect(klass.stop_on_unknown_option?(double(:name => "baz"))).to be false
end
end

Expand All @@ -150,7 +150,7 @@ def boring(*args)
it "affects all specified commands" do
expect(klass.stop_on_unknown_option?(double(:name => "foo"))).to be_true
expect(klass.stop_on_unknown_option?(double(:name => "bar"))).to be_true
expect(klass.stop_on_unknown_option?(double(:name => "baz"))).to be_false
expect(klass.stop_on_unknown_option?(double(:name => "baz"))).to be false
end
end

Expand Down

0 comments on commit a2cb2aa

Please sign in to comment.