Skip to content

Commit

Permalink
Clean specs
Browse files Browse the repository at this point in the history
  • Loading branch information
LucHermitte committed Aug 18, 2024
1 parent e21f8a4 commit 9acb6fa
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 41 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,12 @@ jobs:
configure-args: |
--with-features=huge
# - name: Set up Git
# run: |
# git config --global user.email 'ci@example.com'
# git config --global user.name 'CI'
# git config --global init.defaultBranch 'master'

# - name: Install Vim plugin dependencies
# run: bundle exec rake dump install
- name: Install vim plugin dependencies & Run tests
- name: Install vim plugin dependencies
# manually install UT -- without vim-flavor which will install
# lh-vim-lib another time...
run: |
mkdir -p ~/.vim/pack/flavors/start
git clone https://github.com/LucHermitte/vim-UT ~/.vim/pack/flavors/start/UT
- name: Run tests
run: |
xvfb-run bundle exec rake test
1 change: 0 additions & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
--color
--require spec_helper
--format documentation
-I ~/.vim-flavor/repos/LucHermitte_vim-UT/spec
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ source 'https://rubygems.org'
gem 'rspec', '~> 3.13.0'
gem 'vimrunner', '~> 0.3.5'
gem 'rake', '~> 13.0.1'
gem 'vim-flavor', '~> 4.0.3'
# gem 'vim-flavor', '~> 4.0.3'
8 changes: 3 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ end

task :test => :spec

task :spec do
# sh "bundle exec rspec ~/.vim-flavor/repos/LucHermitte_vim-UT/spec/UT_spec_v2.rb"
sh "bundle exec rspec spec/UT_spec.rb"
# sh "bundle exec rspec ~/.vim-flavor/repos/LucHermitte_vim-UT/spec"
end
# task :spec do
# sh "bundle exec rspec spec/UT_spec.rb"
# end

task :install do
sh 'cd tests && bundle exec vim-flavor install'
Expand Down
25 changes: 0 additions & 25 deletions spec/UT_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,31 +56,6 @@
end
end
expect(ok).to be_truthy, "expected test to succeed, got\n#{log}\n"
### log_file = '/tmp/'+ file + '.log'
##vim.command('call writefile(["test"], "'+log_file+'")')
##vim.command('call lh#log#set_logger("file", "'+log_file+'")')
##vim.command('call lh#log#this("Logging UT '+file+'")')
### print "Check log file '#{log_file}' exists\n"
##expect(log_file).to be_an_existing_file
##result = vim.echo('lh#UT#check(0, "'+abs_file+'")')
### pp "result: #{abs_file} -> #{result}"
### Keep only the list =>
##if not (result.nil? or result.empty?)
## # Clean echoed messages
## result = eval(result.match(/\[\d,.*\]\]/)[0])
##end
### pp "result0: #{result[0]}"
##if result.nil? or result.empty? or (result[0] == 0)
## print "Log file: #{file}.log"
## if File.file?(log_file)
## log = File.read(log_file)
## print "LOG: #{log}\n"
## else
## print "Warning: Cannot read #{log_file}\n"
## end
##end
##expect(result).to_not be_nil
##expect(result).to be_successful
end
}
end
Expand Down

0 comments on commit 9acb6fa

Please sign in to comment.