Skip to content

Commit 1a5bd05

Browse files
committed
Foobarified some of the test cases
Makes test cases use foobar style
1 parent 38d19b1 commit 1a5bd05

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## HEAD (unreleased)
22

3+
- Replace some references in tests with foobar style code (https://github.com/zombocom/dead_end/pull/38)
4+
35
## 1.0.1
46

57
- Fix performance issue when evaluating multiple block combinations (https://github.com/zombocom/dead_end/pull/35)

spec/fixtures/routes.txt.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@
113113
namespace :admin do
114114
resource :session
115115

116-
match "/out_of_office(*path)", via: :all, to: redirect { |_params, req|
117-
uri = URI(req.path.gsub("out_of_office", "in_office"))
116+
match "/foobar(*path)", via: :all, to: redirect { |_params, req|
117+
uri = URI(req.path.gsub("foobar", "foobaz"))
118118
uri.query = req.query_string.presence
119119
uri.to_s
120120
}

spec/perf/perf_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module DeadEnd
2222
107 constraints -> { Rails.application.config.non_production } do
2323
111 end
2424
❯ 113 namespace :admin do
25-
❯ 116 match "/out_of_office(*path)", via: :all, to: redirect { |_params, req|
25+
❯ 116 match "/foobar(*path)", via: :all, to: redirect { |_params, req|
2626
❯ 120 }
2727
121 end
2828
EOM

spec/unit/code_search_spec.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ class Foo
4545
it "handles no spaces between blocks" do
4646
search = CodeSearch.new(<<~'EOM')
4747
require "rails_helper"
48-
RSpec.describe TelehealthAppointment, type: :model do
49-
describe "#participants_state" do
50-
context "timezones workaround" do
51-
it "should receive a time in UTC format and return the time with the"\
52-
"office's UTC offset substracted from it" do
48+
RSpec.describe Foo, type: :model do
49+
describe "#bar" do
50+
context "context" do
51+
it "foos the bar with a foo and then bazes the foo with a bar to"\
52+
"fooify the barred bar" do
5353
travel_to DateTime.new(2020, 10, 1, 10, 0, 0) do
54-
office = build(:office)
54+
foo = build(:foo)
5555
end
5656
end
5757
end
5858
end
59-
describe "#past?" do
60-
context "more than 15 min have passed since appointment start time" do
59+
describe "#baz?" do
60+
context "baz has barred the foo" do
6161
it "returns true" do # <== HERE
6262
end
6363
end
@@ -71,8 +71,8 @@ class Foo
7171

7272
it "handles no spaces between blocks" do
7373
search = CodeSearch.new(<<~EOM)
74-
context "timezones workaround" do
75-
it "should receive a time in UTC format and return the time with the" do
74+
context "foo bar" do
75+
it "bars the foo" do
7676
travel_to DateTime.new(2020, 10, 1, 10, 0, 0) do
7777
end
7878
end

0 commit comments

Comments
 (0)