Skip to content

Commit

Permalink
Set up rake test runner and use VimFlavor
Browse files Browse the repository at this point in the history
  • Loading branch information
nelstrom committed Nov 15, 2013
1 parent 98db97c commit ddff49c
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1 +1,3 @@
Session.vim Session.vim
.vim-flavor/
VimFlavor.lock
4 changes: 4 additions & 0 deletions Gemfile
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

gem 'vim-flavor', '~> 1.1'

16 changes: 16 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,16 @@
GEM
remote: https://rubygems.org/
specs:
blankslate (2.1.2.4)
parslet (1.5.0)
blankslate (~> 2.0)
thor (0.18.1)
vim-flavor (1.1.2)
parslet (~> 1.0)
thor (~> 0.14)

PLATFORMS
ruby

DEPENDENCIES
vim-flavor (~> 1.1)
13 changes: 13 additions & 0 deletions Rakefile
@@ -0,0 +1,13 @@
#!/usr/bin/env rake

task :default => :test

task :ci => [:dump, :test]

task :dump do
sh 'vim --version'
end

task :test do
sh 'bundle exec vim-flavor test'
end
1 change: 1 addition & 0 deletions VimFlavor
@@ -0,0 +1 @@
flavor 'kana/vim-textobj-user', '~> 0.3'
File renamed without changes.
15 changes: 7 additions & 8 deletions test/rubyblock_test.vim → t/rubyblock_test.vim
@@ -1,4 +1,3 @@
" nnoremap <leader>r :wa <bar> ! ../vspec/bin/vspec ../vspec/ ../textobj-user . test/rubyblock_test.vim<CR>
silent filetype indent plugin on silent filetype indent plugin on
runtime! macros/matchit.vim runtime! macros/matchit.vim
runtime! plugin/textobj/*.vim runtime! plugin/textobj/*.vim
Expand Down Expand Up @@ -58,7 +57,7 @@ end
describe '<Plug>(textobj-rubyblock-i)' describe '<Plug>(textobj-rubyblock-i)'


before before
silent tabnew test/samples/class.rb silent tabnew t/samples/class.rb
end end


after after
Expand All @@ -74,7 +73,7 @@ end
describe '<Plug>(textobj-rubyblock-a)' describe '<Plug>(textobj-rubyblock-a)'


before before
silent tabnew test/samples/class.rb silent tabnew t/samples/class.rb
end end


after after
Expand All @@ -90,7 +89,7 @@ end
describe '<Plug>(textobj-rubyblock-i)' describe '<Plug>(textobj-rubyblock-i)'


before before
silent tabnew test/samples/commented-end.rb silent tabnew t/samples/commented-end.rb
end end


after after
Expand All @@ -108,7 +107,7 @@ end
describe 'if/else blocks' describe 'if/else blocks'


before before
silent tabnew test/samples/if-else.rb silent tabnew t/samples/if-else.rb
end end


after after
Expand Down Expand Up @@ -143,7 +142,7 @@ end
describe 'nested blocks: (module > class > def > do)' describe 'nested blocks: (module > class > def > do)'


before before
silent tabnew test/samples/nested-blocks.rb silent tabnew t/samples/nested-blocks.rb
end end


after after
Expand Down Expand Up @@ -242,7 +241,7 @@ describe 'rubyblocks with a method call'
end end


it 'handles `end.max` style method invocations' it 'handles `end.max` style method invocations'
silent tabnew test/samples/map-dot-max.rb silent tabnew t/samples/map-dot-max.rb
Expect SelectInsideFrom(2, '^') ==# [2, 2, 2] Expect SelectInsideFrom(2, '^') ==# [2, 2, 2]
Expect SelectAroundFrom(2, '^') ==# [2, 1, 3] Expect SelectAroundFrom(2, '^') ==# [2, 1, 3]
end end
Expand All @@ -252,7 +251,7 @@ end
describe 'oneline conditionals' describe 'oneline conditionals'


before before
silent tabnew test/samples/oneline-conditionals.rb silent tabnew t/samples/oneline-conditionals.rb
end end


after after
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions t/samples/commented-end.rb
@@ -0,0 +1,3 @@
class Foo
# this is a comment with no end
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions test/samples/commented-end.rb

This file was deleted.

0 comments on commit ddff49c

Please sign in to comment.