Skip to content

Commit 121bf3f

Browse files
committed
fixing features specs in travis
1 parent 4c87fe4 commit 121bf3f

12 files changed

+28
-52
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ sgemset
4848
tags
4949

5050
.localeapp
51+
52+
.byebug_history

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ group :test do
5858
gem 'faker', '~> 1.9'
5959
gem 'capybara', '~> 3.15'
6060
gem 'selenium-webdriver', '~> 3.142'
61-
gem 'webdrivers', '~> 4.1.2'
61+
gem 'webdrivers', '~> 4.2.0'
6262
gem 'simplecov', '~> 0.17', require: false
6363
end

Gemfile.lock

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ GEM
4747
minitest (~> 5.1)
4848
thread_safe (~> 0.3, >= 0.3.4)
4949
tzinfo (~> 1.1)
50-
addressable (2.5.1)
51-
public_suffix (~> 2.0, >= 2.0.2)
50+
addressable (2.7.0)
51+
public_suffix (>= 2.0.2, < 5.0)
5252
airbrussh (0.8.0)
5353
sshkit (>= 1.6.1, != 1.7.0)
5454
arbre (1.1.1)
@@ -83,16 +83,15 @@ GEM
8383
capistrano-rbenv (2.1.3)
8484
capistrano (~> 3.1)
8585
sshkit (~> 1.3)
86-
capybara (3.15.1)
86+
capybara (3.31.0)
8787
addressable
8888
mini_mime (>= 0.1.3)
8989
nokogiri (~> 1.8)
9090
rack (>= 1.6.0)
9191
rack-test (>= 0.6.3)
92-
regexp_parser (~> 1.2)
92+
regexp_parser (~> 1.5)
9393
xpath (~> 3.2)
94-
childprocess (1.0.1)
95-
rake (< 13.0)
94+
childprocess (3.0.0)
9695
coderay (1.1.2)
9796
coffee-rails (4.1.0)
9897
coffee-script (>= 2.2.0)
@@ -204,7 +203,7 @@ GEM
204203
mime-types (3.1)
205204
mime-types-data (~> 3.2015)
206205
mime-types-data (3.2016.0521)
207-
mini_mime (1.0.1)
206+
mini_mime (1.0.2)
208207
mini_portile2 (2.4.0)
209208
minitest (5.11.3)
210209
multi_json (1.11.2)
@@ -213,7 +212,7 @@ GEM
213212
net-ssh (>= 2.6.5, < 6.0.0)
214213
net-ssh (5.2.0)
215214
netrc (0.11.0)
216-
nokogiri (1.10.3)
215+
nokogiri (1.10.8)
217216
mini_portile2 (~> 2.4.0)
218217
orm_adapter (0.5.0)
219218
parallel (1.19.1)
@@ -228,11 +227,11 @@ GEM
228227
ttfunk (~> 1.5)
229228
prawn-table (0.2.2)
230229
prawn (>= 1.3.0, < 3.0.0)
231-
public_suffix (2.0.5)
230+
public_suffix (4.0.3)
232231
pundit (2.0.0)
233232
activesupport (>= 3.0.0)
234233
raabro (1.1.6)
235-
rack (1.6.11)
234+
rack (1.6.13)
236235
rack-protection (2.0.1)
237236
rack
238237
rack-test (0.6.3)
@@ -266,7 +265,7 @@ GEM
266265
thor (>= 0.18.1, < 2.0)
267266
rainbow (3.0.0)
268267
raindrops (0.16.0)
269-
rake (12.3.3)
268+
rake (13.0.1)
270269
ransack (1.8.6)
271270
actionpack (>= 3.0)
272271
activerecord (>= 3.0)
@@ -312,7 +311,7 @@ GEM
312311
ruby-progressbar (~> 1.7)
313312
unicode-display_width (>= 1.4.0, < 1.7)
314313
ruby-progressbar (1.10.1)
315-
rubyzip (1.2.3)
314+
rubyzip (2.2.0)
316315
sass (3.4.21)
317316
sass-rails (5.0.7)
318317
railties (>= 4.0.0, < 6)
@@ -322,9 +321,9 @@ GEM
322321
tilt (>= 1.1, < 3)
323322
select2-rails (4.0.1)
324323
thor (~> 0.14)
325-
selenium-webdriver (3.142.3)
326-
childprocess (>= 0.5, < 2.0)
327-
rubyzip (~> 1.2, >= 1.2.2)
324+
selenium-webdriver (3.142.7)
325+
childprocess (>= 0.5, < 4.0)
326+
rubyzip (>= 1.2.2)
328327
shoulda-matchers (3.1.2)
329328
activesupport (>= 4.0.0)
330329
sidekiq (5.1.3)
@@ -381,9 +380,9 @@ GEM
381380
binding_of_caller (>= 0.7.2)
382381
railties (>= 4.0)
383382
sprockets-rails (>= 2.0, < 4.0)
384-
webdrivers (4.1.2)
383+
webdrivers (4.2.0)
385384
nokogiri (~> 1.6)
386-
rubyzip (~> 1.0)
385+
rubyzip (>= 1.3.0)
387386
selenium-webdriver (>= 3.0, < 4.0)
388387
xpath (3.2.0)
389388
nokogiri (~> 1.8)
@@ -439,7 +438,7 @@ DEPENDENCIES
439438
uglifier (= 2.7.2)
440439
unicorn
441440
web-console (= 2.1.3)
442-
webdrivers (~> 4.1.2)
441+
webdrivers (~> 4.2.0)
443442

444443
RUBY VERSION
445444
ruby 2.6.3p62

spec/controllers/inquiries_controller_spec.rb

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
organization: test_organization,
1212
category: test_category)
1313
end
14-
15-
include_context "stub browser locale"
16-
17-
before { set_browser_locale("ca") }
1814

1915
describe "GET #index" do
2016
context "with a logged user" do
@@ -42,7 +38,7 @@
4238

4339
describe "POST #create" do
4440
context "with valid params" do
45-
context "with a logged user" do
41+
context "with a logged user" do
4642
it "creates a new inquiry" do
4743
login(another_member.user)
4844
expect do
@@ -59,7 +55,7 @@
5955
context "with valid params" do
6056
context "with a logged user" do
6157
before { login(member.user) }
62-
58+
6359
it "located the requested @inquiry" do
6460
put "update", id: inquiry.id, inquiry: Fabricate.to_params(:inquiry)
6561
expect(assigns(:inquiry)).to eq(inquiry)
@@ -83,7 +79,7 @@
8379
end
8480

8581
context "with invalid params" do
86-
context "with a logged user" do
82+
context "with a logged user" do
8783
it "does not change @inquiry's attributes" do
8884
login(member.user)
8985

@@ -103,7 +99,7 @@
10399

104100
describe "DELETE destroy" do
105101
before { login(member.user) }
106-
102+
107103
it "toggle active field" do
108104
delete :destroy, id: inquiry.id
109105

spec/controllers/multi_transfers_controller_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
category: test_category)
1515
end
1616

17-
include_context "stub browser locale"
18-
19-
before { set_browser_locale("en") }
20-
2117
it 'creates one to many transfers' do
2218
expect do
2319
login(admin.user)

spec/controllers/offers_controller_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
category: test_category)
1414
end
1515

16-
include_context "stub browser locale"
17-
18-
before { set_browser_locale("ca") }
19-
2016
describe "GET #index" do
2117
context "with a logged user" do
2218
it "populates an array of offers" do

spec/controllers/transfers_controller_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
let (:member_giver) { Fabricate(:member, organization: test_organization) }
77
let (:member_taker) { Fabricate(:member, organization: test_organization) }
88

9-
include_context 'stub browser locale'
10-
11-
before { set_browser_locale('ca') }
12-
139
describe '#new' do
1410
let(:user) { member_giver.user }
1511

spec/controllers/users_controller_spec.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@
3434
let!(:wrong_user) { wrong_email_member.user }
3535
let!(:empty_email_user) { empty_email_member.user }
3636

37-
include_context "stub browser locale"
38-
before { set_browser_locale("ca") }
39-
4037
describe "GET #index" do
4138
before { login(user) }
4239

spec/fabricators/user_fabricator.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
Fabricator(:user) do
2-
Faker::Config.locale = :es
3-
42
username { Faker::Internet.user_name }
53
email { Faker::Internet.email }
64
date_of_birth { DateTime.now.utc }
@@ -11,7 +9,7 @@
119
gender { ["male", "female"].shuffle.first }
1210
description { Faker::Lorem.paragraph }
1311
last_sign_in_at { DateTime.new(2018, 10, 1) }
14-
1512
terms_accepted_at DateTime.now.utc
1613
confirmed_at DateTime.now.utc
14+
locale I18n.default_locale
1715
end

spec/features/sign_in_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
Fabricate(:user, email: 'user@timeoverflow.org', password: 'papapa22')
66
end
77

8+
before(:each) { I18n.locale = :en }
9+
810
context 'with a valid password' do
911
it 'signs the user in' do
1012
Capybara.current_session.driver.browser.manage.delete_cookie('_timeoverflow_session')

0 commit comments

Comments
 (0)