Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Test that oneline conditionals are accepted

  • Loading branch information...
commit 97e41086a8ca040e40955a6a968c0b50ae953222 1 parent b49f77d
@nelstrom authored
Showing with 24 additions and 0 deletions.
  1. +18 −0 test/rubyblock_test.vim
  2. +6 −0 test/samples/oneline-conditionals.rb
View
18 test/rubyblock_test.vim
@@ -248,3 +248,21 @@ describe 'rubyblocks with a method call'
end
end
+
+describe 'oneline conditionals'
+
+ before
+ silent tabnew test/samples/oneline-conditionals.rb
+ end
+
+ after
+ silent tabclose
+ end
+
+ it 'is not confused by trailing if/unless statements'
+ TODO
+ Expect SelectInsideFrom(2, '^') ==# [2, 2, 5]
+ Expect SelectAroundFrom(1, '^') ==# [1, 1, 6]
+ end
+
+end
View
6 test/samples/oneline-conditionals.rb
@@ -0,0 +1,6 @@
+def adjust_format_for_istar
+ request.format = :iphone if iphone?
+ request.format = :ipad if ipad?
+ request.format = :js if request.xhr?
+ request.format = :html unless request.xml?
+end
Please sign in to comment.
Something went wrong with that request. Please try again.