Skip to content

Commit

Permalink
introduce guard
Browse files Browse the repository at this point in the history
change test filename convention: from prefix(test) to suffix(_test) to make watchale by guard.
  • Loading branch information
kakutani committed Aug 12, 2011
1 parent 1b56d92 commit 1186e09
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Gemfile
@@ -1,5 +1,13 @@
source :rubygems

group :darwin do
gem 'rb-fsevent'
gem 'growl'
end

gem 'guard'
gem 'guard-test'

group :test do
gem 'simplecov', :require => false, :platforms => :ruby_19
gem 'rcov', :require => false, :platforms => :ruby_18
Expand Down
8 changes: 8 additions & 0 deletions Guardfile
@@ -0,0 +1,8 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme

guard 'test', :all_on_start => true do
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
watch(%r{^test/.+_test\.rb$})
watch('test/test_helper.rb') { "test" }
end
6 changes: 3 additions & 3 deletions test/testcharstring.rb → test/charstring_test.rb 100644 → 100755
Expand Up @@ -985,17 +985,17 @@ def test_guess_eol_mixed()
expected = "UNKNOWN"
assert_equal(expected, CharString.guess_eol(str))
end
def test_guess_eol_cr()
def test_guess_eol_cr2()
str = "foo\rbar\rbaz\r".extend CharString
expected = "CR"
assert_equal(expected, CharString.guess_eol(str))
end
def test_guess_eol_lf()
def test_guess_eol_lf2()
str = "foo\nbar\nbaz\n".extend CharString
expected = "LF"
assert_equal(expected, CharString.guess_eol(str))
end
def test_guess_eol_crlf()
def test_guess_eol_crlf2()
str = "foo\r\nbar\r\nbaz\r\n".extend CharString
expected = "CRLF"
assert_equal(expected, CharString.guess_eol(str))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 1186e09

Please sign in to comment.