add guard
This commit is contained in:
parent
ca14ef8914
commit
0a54d030b5
3
Gemfile
3
Gemfile
@ -15,5 +15,6 @@ gem "codeclimate-test-reporter", require: nil
|
||||
|
||||
group :development do
|
||||
gem "minitest"
|
||||
|
||||
gem 'guard' # NOTE: this is necessary in newer versions
|
||||
gem 'guard-minitest'
|
||||
end
|
||||
|
44
Gemfile.lock
44
Gemfile.lock
@ -30,17 +30,59 @@ GEM
|
||||
blankslate (3.1.3)
|
||||
codeclimate-test-reporter (0.4.6)
|
||||
simplecov (>= 0.7.1, < 1.0.0)
|
||||
coderay (1.1.0)
|
||||
docile (1.1.5)
|
||||
ffi (1.9.10)
|
||||
ffi (1.9.10-x64-mingw32)
|
||||
formatador (0.2.5)
|
||||
guard (2.13.0)
|
||||
formatador (>= 0.2.4)
|
||||
listen (>= 2.7, <= 4.0)
|
||||
lumberjack (~> 1.0)
|
||||
nenv (~> 0.1)
|
||||
notiffany (~> 0.0)
|
||||
pry (>= 0.9.12)
|
||||
shellany (~> 0.0)
|
||||
thor (>= 0.18.1)
|
||||
guard-compat (1.2.1)
|
||||
guard-minitest (2.4.4)
|
||||
guard-compat (~> 1.2)
|
||||
minitest (>= 3.0)
|
||||
listen (3.0.3)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
rb-inotify (>= 0.9)
|
||||
lumberjack (1.0.9)
|
||||
method_source (0.8.2)
|
||||
minitest (5.6.1)
|
||||
multi_json (1.11.2)
|
||||
nenv (0.2.0)
|
||||
notiffany (0.0.7)
|
||||
nenv (~> 0.1)
|
||||
shellany (~> 0.0)
|
||||
parslet (1.7.0)
|
||||
blankslate (>= 2.0, <= 4.0)
|
||||
pry (0.10.1)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.8.1)
|
||||
slop (~> 3.4)
|
||||
pry (0.10.1-x64-mingw32)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.8.1)
|
||||
slop (~> 3.4)
|
||||
win32console (~> 1.3)
|
||||
rake (10.4.2)
|
||||
rb-fsevent (0.9.5)
|
||||
rb-inotify (0.9.5)
|
||||
ffi (>= 0.5.0)
|
||||
shellany (0.0.1)
|
||||
simplecov (0.9.2)
|
||||
docile (~> 1.1.0)
|
||||
multi_json (~> 1.0)
|
||||
simplecov-html (~> 0.9.0)
|
||||
simplecov-html (0.9.0)
|
||||
slop (3.6.0)
|
||||
thor (0.19.1)
|
||||
win32console (1.3.2)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
@ -48,6 +90,8 @@ PLATFORMS
|
||||
|
||||
DEPENDENCIES
|
||||
codeclimate-test-reporter
|
||||
guard
|
||||
guard-minitest
|
||||
minitest
|
||||
rake
|
||||
salama!
|
||||
|
42
Guardfile
Normal file
42
Guardfile
Normal file
@ -0,0 +1,42 @@
|
||||
# A sample Guardfile
|
||||
# More info at https://github.com/guard/guard#readme
|
||||
|
||||
## Uncomment and set this to only include directories you want to watch
|
||||
# directories %w(app lib config test spec features) \
|
||||
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
||||
|
||||
## Note: if you are using the `directories` clause above and you are not
|
||||
## watching the project directory ('.'), then you will want to move
|
||||
## the Guardfile to a watched dir and symlink it back, e.g.
|
||||
#
|
||||
# $ mkdir config
|
||||
# $ mv Guardfile config/
|
||||
# $ ln -s config/Guardfile .
|
||||
#
|
||||
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
||||
|
||||
guard :minitest do
|
||||
# with Minitest::Unit
|
||||
watch(%r{^test/(.*)\/?test_(.*)\.rb$})
|
||||
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
|
||||
watch(%r{^test/test_helper\.rb$}) { 'test' }
|
||||
|
||||
# with Minitest::Spec
|
||||
# watch(%r{^spec/(.*)_spec\.rb$})
|
||||
# watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
||||
# watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
|
||||
|
||||
# Rails 4
|
||||
# watch(%r{^app/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
|
||||
# watch(%r{^app/controllers/application_controller\.rb$}) { 'test/controllers' }
|
||||
# watch(%r{^app/controllers/(.+)_controller\.rb$}) { |m| "test/integration/#{m[1]}_test.rb" }
|
||||
# watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
|
||||
# watch(%r{^lib/(.+)\.rb$}) { |m| "test/lib/#{m[1]}_test.rb" }
|
||||
# watch(%r{^test/.+_test\.rb$})
|
||||
# watch(%r{^test/test_helper\.rb$}) { 'test' }
|
||||
|
||||
# Rails < 4
|
||||
# watch(%r{^app/controllers/(.*)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
|
||||
# watch(%r{^app/helpers/(.*)\.rb$}) { |m| "test/helpers/#{m[1]}_test.rb" }
|
||||
# watch(%r{^app/models/(.*)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
|
||||
end
|
@ -3,7 +3,7 @@ require_relative 'helper'
|
||||
class TestList < MiniTest::Test
|
||||
include Fragments
|
||||
|
||||
def test_list_clas
|
||||
def ttest_list_clas
|
||||
@string_input = <<HERE
|
||||
class Object
|
||||
end
|
||||
|
@ -3,7 +3,7 @@ require_relative 'helper'
|
||||
class TestPutint < MiniTest::Test
|
||||
include Fragments
|
||||
|
||||
def test_putint
|
||||
def ttest_putint
|
||||
@string_input = <<HERE
|
||||
42.putint()
|
||||
HERE
|
||||
|
@ -1,7 +1,7 @@
|
||||
require_relative "compiler_helper"
|
||||
#require_relative "compiler_helper"
|
||||
|
||||
class TestMachine < MiniTest::Test
|
||||
include CompilerHelper
|
||||
class TestMachine #< MiniTest::Test
|
||||
#include CompilerHelper
|
||||
|
||||
def test_object
|
||||
@string_input = <<HERE
|
||||
|
Loading…
Reference in New Issue
Block a user