summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/command_callback/test_ruby_solargraph.vader29
-rw-r--r--test/ruby_fixtures/valid_ruby_app1/Rakefile0
-rw-r--r--test/ruby_fixtures/valid_ruby_app1/lib/file.rb0
-rw-r--r--test/ruby_fixtures/valid_ruby_app2/Gemfile0
-rw-r--r--test/ruby_fixtures/valid_ruby_app2/lib/file.rb0
5 files changed, 29 insertions, 0 deletions
diff --git a/test/command_callback/test_ruby_solargraph.vader b/test/command_callback/test_ruby_solargraph.vader
new file mode 100644
index 00000000..a27cb62d
--- /dev/null
+++ b/test/command_callback/test_ruby_solargraph.vader
@@ -0,0 +1,29 @@
+" Author: Horacio Sanson <https://github.com/hsanson>
+" Description: Tests for solargraph lsp linter.
+
+Before:
+ call ale#assert#SetUpLinterTest('ruby', 'solargraph')
+
+After:
+ call ale#assert#TearDownLinterTest()
+
+Execute(should set solargraph for rails app):
+ call ale#test#SetFilename('../ruby_fixtures/valid_rails_app/app/models/thing.rb')
+ AssertLSPLanguage 'ruby'
+ AssertLSPOptions {}
+ AssertLSPProject ale#path#Simplify(g:dir . 'command_callback/../ruby_fixtures/valid_rails_app')
+ AssertLSPAddress '127.0.0.1:7658'
+
+Execute(should set solargraph for ruby app1):
+ call ale#test#SetFilename('../ruby_fixtures/valid_ruby_app1/lib/file.rb')
+ AssertLSPLanguage 'ruby'
+ AssertLSPOptions {}
+ AssertLSPProject ale#path#Simplify(g:dir . 'command_callback/../ruby_fixtures/valid_ruby_app1')
+ AssertLSPAddress '127.0.0.1:7658'
+
+Execute(should set solargraph for ruby app2):
+ call ale#test#SetFilename('../ruby_fixtures/valid_ruby_app2/lib/file.rb')
+ AssertLSPLanguage 'ruby'
+ AssertLSPOptions {}
+ AssertLSPProject ale#path#Simplify(g:dir . 'command_callback/../ruby_fixtures/valid_ruby_app2')
+ AssertLSPAddress '127.0.0.1:7658'
diff --git a/test/ruby_fixtures/valid_ruby_app1/Rakefile b/test/ruby_fixtures/valid_ruby_app1/Rakefile
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/ruby_fixtures/valid_ruby_app1/Rakefile
diff --git a/test/ruby_fixtures/valid_ruby_app1/lib/file.rb b/test/ruby_fixtures/valid_ruby_app1/lib/file.rb
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/ruby_fixtures/valid_ruby_app1/lib/file.rb
diff --git a/test/ruby_fixtures/valid_ruby_app2/Gemfile b/test/ruby_fixtures/valid_ruby_app2/Gemfile
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/ruby_fixtures/valid_ruby_app2/Gemfile
diff --git a/test/ruby_fixtures/valid_ruby_app2/lib/file.rb b/test/ruby_fixtures/valid_ruby_app2/lib/file.rb
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/ruby_fixtures/valid_ruby_app2/lib/file.rb