Skip to content

Commit fd0abd1

Browse files
committed
Replace be_true with be true
1 parent a2cb2aa commit fd0abd1

12 files changed

+53
-53
lines changed

spec/actions/create_file_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def silence!
3030
it "creates a file" do
3131
create_file("doc/config.rb")
3232
invoke!
33-
expect(File.exists?(File.join(destination_root, "doc/config.rb"))).to be_true
33+
expect(File.exists?(File.join(destination_root, "doc/config.rb"))).to be true
3434
end
3535

3636
it "does not create a file if pretending" do
@@ -59,7 +59,7 @@ def silence!
5959
it "converts encoded instructions" do
6060
create_file("doc/%file_name%.rb.tt")
6161
invoke!
62-
expect(File.exists?(File.join(destination_root, "doc/rdoc.rb.tt"))).to be_true
62+
expect(File.exists?(File.join(destination_root, "doc/rdoc.rb.tt"))).to be true
6363
end
6464

6565
describe "when file exists" do
@@ -155,7 +155,7 @@ def silence!
155155
create_file("doc/config.rb")
156156
expect(@action.exists?).to be false
157157
invoke!
158-
expect(@action.exists?).to be_true
158+
expect(@action.exists?).to be true
159159
end
160160
end
161161

@@ -164,7 +164,7 @@ def silence!
164164
create_file("doc/config.rb")
165165
expect(@action.identical?).to be false
166166
invoke!
167-
expect(@action.identical?).to be_true
167+
expect(@action.identical?).to be true
168168
end
169169
end
170170
end

spec/actions/create_link_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,24 @@ def silence!
3636
create_link("doc/config.rb", :symbolic => true)
3737
invoke!
3838
destination_path = File.join(destination_root, "doc/config.rb")
39-
expect(File.exists?(destination_path)).to be_true
40-
expect(File.symlink?(destination_path)).to be_true
39+
expect(File.exists?(destination_path)).to be true
40+
expect(File.symlink?(destination_path)).to be true
4141
end
4242

4343
it "creates a hard link for :symbolic => false" do
4444
create_link(@hardlink_to, :symbolic => false)
4545
invoke!
4646
destination_path = @hardlink_to
47-
expect(File.exists?(destination_path)).to be_true
47+
expect(File.exists?(destination_path)).to be true
4848
expect(File.symlink?(destination_path)).to be false
4949
end
5050

5151
it "creates a symbolic link by default" do
5252
create_link("doc/config.rb")
5353
invoke!
5454
destination_path = File.join(destination_root, "doc/config.rb")
55-
expect(File.exists?(destination_path)).to be_true
56-
expect(File.symlink?(destination_path)).to be_true
55+
expect(File.exists?(destination_path)).to be true
56+
expect(File.symlink?(destination_path)).to be true
5757
end
5858

5959
it "does not create a link if pretending" do
@@ -79,7 +79,7 @@ def silence!
7979
create_link("doc/config.rb")
8080
expect(@action.identical?).to be false
8181
invoke!
82-
expect(@action.identical?).to be_true
82+
expect(@action.identical?).to be true
8383
end
8484
end
8585

spec/actions/directory_spec.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def exists_and_identical?(source_path, destination_path)
2828
source = File.join(source_root, source_path, file)
2929
destination = File.join(destination_root, destination_path, file)
3030

31-
expect(File.exists?(destination)).to be_true
32-
expect(FileUtils.identical?(source, destination)).to be_true
31+
expect(File.exists?(destination)).to be true
32+
expect(FileUtils.identical?(source, destination)).to be true
3333
end
3434
end
3535

@@ -59,7 +59,7 @@ def exists_and_identical?(source_path, destination_path)
5959
invoke! ".", "commands", :recursive => false
6060

6161
file = File.join(destination_root, "commands", "group.thor")
62-
expect(File.exists?(file)).to be_true
62+
expect(File.exists?(file)).to be true
6363

6464
file = File.join(destination_root, "commands", "doc")
6565
expect(File.exists?(file)).to be false
@@ -77,7 +77,7 @@ def exists_and_identical?(source_path, destination_path)
7777
it "copies and evaluates files within excluding/ directory when no exclude_pattern is present" do
7878
invoke! "doc", "docs"
7979
file = File.join(destination_root, "docs", "excluding", "rdoc.rb")
80-
expect(File.exists?(file)).to be_true
80+
expect(File.exists?(file)).to be true
8181
expect(File.read(file)).to eq("BAR = BAR\n")
8282
end
8383

@@ -91,7 +91,7 @@ def exists_and_identical?(source_path, destination_path)
9191
it "copies and evaluates templates" do
9292
invoke! "doc", "docs"
9393
file = File.join(destination_root, "docs", "rdoc.rb")
94-
expect(File.exists?(file)).to be_true
94+
expect(File.exists?(file)).to be true
9595
expect(File.read(file)).to eq("FOO = FOO\n")
9696
end
9797

@@ -105,8 +105,8 @@ def exists_and_identical?(source_path, destination_path)
105105
it "copies directories" do
106106
invoke! "doc", "docs"
107107
file = File.join(destination_root, "docs", "components")
108-
expect(File.exists?(file)).to be_true
109-
expect(File.directory?(file)).to be_true
108+
expect(File.exists?(file)).to be true
109+
expect(File.directory?(file)).to be true
110110
end
111111

112112
it "does not copy .empty_directory files" do
@@ -118,7 +118,7 @@ def exists_and_identical?(source_path, destination_path)
118118
it "copies directories even if they are empty" do
119119
invoke! "doc/components", "docs/components"
120120
file = File.join(destination_root, "docs", "components")
121-
expect(File.exists?(file)).to be_true
121+
expect(File.exists?(file)).to be true
122122
end
123123

124124
it "does not copy empty directories twice" do
@@ -139,7 +139,7 @@ def exists_and_identical?(source_path, destination_path)
139139
invoke!("doc") do |content|
140140
checked ||= !!(content =~ /FOO/)
141141
end
142-
expect(checked).to be_true
142+
expect(checked).to be true
143143
end
144144

145145
it "works with glob characters in the path" do
@@ -160,7 +160,7 @@ def exists_and_identical?(source_path, destination_path)
160160

161161
it "works with glob characters in the path" do
162162
invoke! "app{1}"
163-
expect(File.exists?(File.join(destination_root, "app{1}", "README"))).to be_true
163+
expect(File.exists?(File.join(destination_root, "app{1}", "README"))).to be true
164164

165165
revoke! "app{1}"
166166
expect(File.exists?(File.join(destination_root, "app{1}", "README"))).to be false

spec/actions/empty_directory_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def base
5454
it "copies the file to the specified destination" do
5555
empty_directory("doc")
5656
invoke!
57-
expect(File.exists?(File.join(destination_root, "doc"))).to be_true
57+
expect(File.exists?(File.join(destination_root, "doc"))).to be true
5858
end
5959

6060
it "shows created status to the user" do
@@ -92,7 +92,7 @@ def base
9292
empty_directory("doc")
9393
expect(@action.exists?).to be false
9494
invoke!
95-
expect(@action.exists?).to be_true
95+
expect(@action.exists?).to be true
9696
end
9797
end
9898

spec/actions/file_manipulation_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def action(*args, &block)
1313

1414
def exists_and_identical?(source, destination)
1515
destination = File.join(destination_root, destination)
16-
expect(File.exists?(destination)).to be_true
16+
expect(File.exists?(destination)).to be true
1717

1818
source = File.join(source_root, source)
1919
expect(FileUtils).to be_identical(source, destination)
@@ -174,14 +174,14 @@ def file
174174
it "copies the template to the specified destination" do
175175
action :template, "doc/config.rb", "doc/configuration.rb"
176176
file = File.join(destination_root, "doc/configuration.rb")
177-
expect(File.exists?(file)).to be_true
177+
expect(File.exists?(file)).to be true
178178
end
179179

180180
it "converts encoded instructions" do
181181
expect(runner).to receive(:file_name).and_return("rdoc")
182182
action :template, "doc/%file_name%.rb.tt"
183183
file = File.join(destination_root, "doc/rdoc.rb")
184-
expect(File.exists?(file)).to be_true
184+
expect(File.exists?(file)).to be true
185185
end
186186

187187
it "logs status" do
@@ -199,7 +199,7 @@ def file
199199
action :template, "doc/config.yaml.tt"
200200

201201
file = File.join(destination_root, "doc/config.yaml")
202-
expect(File.exists?(file)).to be_true
202+
expect(File.exists?(file)).to be true
203203
end
204204
end
205205

@@ -226,7 +226,7 @@ def file
226226
it "does not remove if pretending" do
227227
runner(:pretend => true)
228228
action :remove_file, "doc/README"
229-
expect(File.exists?(file)).to be_true
229+
expect(File.exists?(file)).to be true
230230
end
231231

232232
it "logs status" do

spec/actions_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ def file
3434
it "when behavior is set to force, overwrite options" do
3535
runner = MyCounter.new([1], { :force => false, :skip => true }, :behavior => :force)
3636
expect(runner.behavior).to eq(:invoke)
37-
expect(runner.options.force).to be_true
38-
expect(runner.options.skip).not_to be_true
37+
expect(runner.options.force).to be true
38+
expect(runner.options.skip).not_to be true
3939
end
4040

4141
it "when behavior is set to skip, overwrite options" do
4242
runner = MyCounter.new([1], ["--force"], :behavior => :skip)
4343
expect(runner.behavior).to eq(:invoke)
44-
expect(runner.options.force).not_to be_true
45-
expect(runner.options.skip).to be_true
44+
expect(runner.options.force).not_to be true
45+
expect(runner.options.skip).to be true
4646
end
4747
end
4848

@@ -146,7 +146,7 @@ def file
146146

147147
it "creates the directory if it does not exist" do
148148
runner.inside("foo") do
149-
expect(File.exists?(file)).to be_true
149+
expect(File.exists?(file)).to be true
150150
end
151151
end
152152

spec/core_ext/hash_with_indifferent_access_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
end
1616

1717
it "handles magic boolean predicates" do
18-
expect(@hash.force?).to be_true
19-
expect(@hash.foo?).to be_true
18+
expect(@hash.force?).to be true
19+
expect(@hash.foo?).to be true
2020
expect(@hash.nothing?).to be false
2121
end
2222

2323
it "handles magic comparisons" do
24-
expect(@hash.foo?('bar')).to be_true
24+
expect(@hash.foo?('bar')).to be true
2525
expect(@hash.foo?('bee')).to be false
2626
end
2727

spec/invocation_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
end
1717

1818
it "invokes a command with arguments" do
19-
expect(A.new.invoke(:five, [5])).to be_true
19+
expect(A.new.invoke(:five, [5])).to be true
2020
expect(A.new.invoke(:five, [7])).to be false
2121
end
2222

spec/parser/options_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,16 @@ def remaining
7979
it "accepts conjoined short switches" do
8080
create ["--foo", "-f"] => true, ["--bar", "-b"] => true, ["--app", "-a"] => true
8181
opts = parse("-fba")
82-
expect(opts["foo"]).to be_true
83-
expect(opts["bar"]).to be_true
84-
expect(opts["app"]).to be_true
82+
expect(opts["foo"]).to be true
83+
expect(opts["bar"]).to be true
84+
expect(opts["app"]).to be true
8585
end
8686

8787
it "accepts conjoined short switches with input" do
8888
create ["--foo", "-f"] => true, ["--bar", "-b"] => true, ["--app", "-a"] => :required
8989
opts = parse "-fba", "12"
90-
expect(opts["foo"]).to be_true
91-
expect(opts["bar"]).to be_true
90+
expect(opts["foo"]).to be true
91+
expect(opts["bar"]).to be true
9292
expect(opts["app"]).to eq("12")
9393
end
9494

spec/runner_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def when_no_thorfiles_exist
6161

6262
it "invokes a command from a specific Thor class" do
6363
ARGV.replace ["my_script:zoo"]
64-
expect(Thor::Runner.start).to be_true
64+
expect(Thor::Runner.start).to be true
6565
end
6666

6767
it "invokes the default command from a specific Thor class if none is specified" do

0 commit comments

Comments
 (0)