Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Commit

Permalink
comment improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
JonJagger committed Jul 27, 2015
1 parent ed0b94a commit a164c25
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
15 changes: 6 additions & 9 deletions app/models/Exercises.rb
Expand Up @@ -18,7 +18,7 @@ def each
end

def [](name)
make_exercise(name) # comment below
make_exercise(name) # See comment below
end

def refresh_cache
Expand Down Expand Up @@ -57,16 +57,13 @@ def cache_filename
end

# - - - - - - - - - - - - - - - - - - - - - - - -
# I'd like to refactor [name] to...
# Refactoring [name] to...
#
# exercises.find {|exercise| exercise.name == name}
#
# But I can't because too many tests would break
# because they use DirFake without an exercises cache.
#
# Hmmm. But maybe that's because they were using a
# stale DiskStub image which only gets updated
# at the start of test/run_all.sh
# Check another time.
# would be nice since it would make use of the cache in
# exercises[name].instructions
# but breaks lots of tests because they use DirFake
# without an exercises cache.
# - - - - - - - - - - - - - - - - - - - - - - - -

4 changes: 2 additions & 2 deletions test/app_models/model_test_base.rb
Expand Up @@ -10,8 +10,8 @@ class ModelTestBase < TestBase
def setup
super
set_runner_class_name 'RunnerStub'
set_disk_class_name 'DiskStub' # TODO?: DiskFake would be faster...
set_git_class_name 'GitSpy'
set_disk_class_name 'DiskStub' # DiskFake would be faster but lots of tests
set_git_class_name 'GitSpy' # fail because they don't Stub specific files.
set_one_self_class_name 'OneSelfDummy'
end

Expand Down
10 changes: 5 additions & 5 deletions test/test-summary.txt
Expand Up @@ -2,12 +2,12 @@
test-summary
t a f e s time t/s a/s cov
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
app_helpers 14 32 0 0 0 0.03 469.70 1073.61 100.00
app_lib 112 4871 0 0 0 0.69 163.10 7093.38 100.00
app_models 112 374 0 0 0 0.59 189.95 634.29 100.00
lib 87 537 0 0 0 4.20 20.72 127.89 100.00
app_helpers 14 32 0 0 0 0.03 544.07 1243.59 100.00
app_lib 112 4871 0 0 0 0.63 178.08 7744.84 100.00
app_models 112 374 0 0 0 0.53 210.52 702.97 100.00
lib 87 537 0 0 0 4.14 21.01 129.67 100.00
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
total 325 5814 0 0 0 5.51 58.98 1055.17
total 325 5814 0 0 0 5.33 60.98 1090.81

t == number of tests
a == number of assertions
Expand Down

0 comments on commit a164c25

Please sign in to comment.