Skip to content

Commit 21b79a2

Browse files
committed
Test on new Rubies, README updates
- Fix link to Spanish version of the README - Test file renames following expected format by editor - Drop minitest reporters for nicer output within the editor - On second exercise return zero instead of - to make the else branches differ more
1 parent 49d501b commit 21b79a2

File tree

11 files changed

+22
-15
lines changed

11 files changed

+22
-15
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: ruby
22
rvm:
3-
- 2.4
4-
- 2.5
3+
- 2.7
4+
- 3.0
55
- jruby-19mode

2-special-case-objects/app.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def last_trial_days(user)
4747
if user.last_subscription && user.last_subscription.respond_to?(:trial_days)
4848
user.last_subscription.trial_days
4949
else
50-
'-'
50+
'0'
5151
end
5252
end
5353
end

2-special-case-objects/tests.rb renamed to 2-special-case-objects/test_app.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class TestApp < Minitest::Test
66
def test_status_report_job
77
response = {
88
"Bob" => { name: "Monthly Subscription", status: "active", trial_days: 14},
9-
"Patricio" => { name: "none", status: "-", trial_days: "-"}
9+
"Patricio" => { name: "none", status: "-", trial_days: "0"}
1010
}
1111
assert_equal response, StatusReportJob.new.perform
1212
end
File renamed without changes.

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ source 'https://rubygems.org'
22

33
gem 'rake'
44
gem 'minitest'
5-
gem 'minitest-reporters'

README.es.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Taller de Refactorización
22

3-
Requerimientos: Ruby >= 2, git, bundler.
3+
Requerimientos: Ruby >= 2.7, git, bundler.
44

55
Cada carpeta lleva por nombre el patrón de refactoring a practicar, y los
66
siguientes archivos:
@@ -9,7 +9,7 @@ siguientes archivos:
99
* `setup.rb` código de inicialización necesario para `app.rb` (sería el
1010
"framework", o el resto de la aplicación). No necesitamos conocerlo o editarlo,
1111
a no ser que sea por curiosidad.
12-
* `tests.rb` el nombre lo explica. Necesarios para la vida, especialmente si
12+
* `test_app.rb` el nombre lo explica. Necesarios para la vida, especialmente si
1313
pensamos refactorizar.
1414

1515
Ejecutar `bundle` para asegurarse de tener las rubygems necesarias para correr
@@ -42,3 +42,13 @@ Nota de implementación: contiene dos archivos adicionales necesarios para los
4242
tests: `fixtures/input.csv` y `fixtures/output.csv`, y no contiene `setup.rb`.
4343

4444
## 4. Service Object
45+
46+
47+
# Slides
48+
49+
* [Slides (English)](https://github.com/tute/refactoring-workshop-slides-sep-2015/)
50+
* [Slides (Español)](https://www.tutecosta.com/refactoring-workshop-slides-sep-2015/#/) [repo](https://github.com/tute/refactoring-workshop-slides-sep-2015/tree/es)
51+
52+
# In English
53+
54+
[English version of this doc available](https://github.com/tute/refactoring-workshop/blob/master/README.md).

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Refactoring Workshop
22

3-
Requirements: Ruby >= 2.0, git, `minitest` gem.
3+
Requirements: Ruby >= 2.7, git, `minitest` gem.
44

55
Each folder is named after the refactoring pattern they tackle, and contains:
66

77
* `app.rb` code we'll refactor.
88
* `setup.rb` necessary code for `app.rb` to run (mimicks a SUPER BASIC Rails)
99
We don't need to see/edit it unless just curious. :-)
10-
* `tests.rb` self explanatory. Necessary for daily life, specially for
10+
* `test_app.rb` self explanatory. Necessary for daily life, specially for
1111
refactoring.
1212

1313
Run `bundle` to make sure you have the gems needed for running tests (`rake`
@@ -44,9 +44,9 @@ Implementation note: folder contains two fixture files needed for tests,
4444

4545
# Slides
4646

47-
* [RubyConf Argentina Slides](http://es.slideshare.net/thoughtbot/refactoring-workshop-rubyconf-argentina-2014)
48-
* [RailsConf Slides](http://www.slideshare.net/tutec/simplifying-code-monster-to-elegant-in-n-5-steps)
47+
* [Slides (English)](https://github.com/tute/refactoring-workshop-slides-sep-2015/)
48+
* [Slides (Español)](https://www.tutecosta.com/refactoring-workshop-slides-sep-2015/#/) [repo](https://github.com/tute/refactoring-workshop-slides-sep-2015/tree/es)
4949

5050
# In Spanish
5151

52-
[Spanish version of this doc available](https://github.com/tute/refactoring-workshop/blob/master/README.md).
52+
[Spanish version of this doc available](https://github.com/tute/refactoring-workshop/blob/master/README.es.md).

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require 'rake/testtask'
44

55
Rake::TestTask.new(:test) do |t|
66
t.libs = FileList['*-*/']
7-
t.test_files = FileList['*/tests.rb']
7+
t.test_files = FileList['*/test_*.rb']
88
end
99

1010
task default: :test

test_helper.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
require "minitest/autorun"
2-
require "minitest/reporters"
3-
Minitest::Reporters.use!

0 commit comments

Comments
 (0)