Commit 4b8b4b91 authored by Bruno Pinto's avatar Bruno Pinto

improves text of tests

parent 0bfb95a5
import plugins/bak import plugins/bak
import plugins/fish-spec import plugins/fish-spec
function describe_bak -d 'Testing bak plugin' function describe_bak_plugin
function before_all function before_all
set -g test_dir /tmp/bak_test set -g test_dir /tmp/bak_test
mkdir -p $test_dir mkdir -p $test_dir
...@@ -18,13 +18,13 @@ function describe_bak -d 'Testing bak plugin' ...@@ -18,13 +18,13 @@ function describe_bak -d 'Testing bak plugin'
popd popd
end end
function it_checks_bak_filename_pattern_is_followed function it_checks_if_bak_filename_pattern_is_followed
expect __is_bak '.ccnet.20140817_234302.bak' --to-be-true expect __is_bak '.ccnet.20140817_234302.bak' --to-be-true
expect __is_bak 'file\ with\ spaces.20140817_234302.bak' --to-be-true expect __is_bak 'file\ with\ spaces.20140817_234302.bak' --to-be-true
expect __is_bak '.ccnet.bak' --to-be-false expect __is_bak '.ccnet.bak' --to-be-false
end end
function it_normalizes_file_name function it_normalizes_the_file_name
expect (__bak_normalized '.ccnet.20140817_234302.bak') --to-equal '.ccnet' expect (__bak_normalized '.ccnet.20140817_234302.bak') --to-equal '.ccnet'
expect (__bak_normalized 'file with spaces.20140817_234302.bak') --to-equal 'file with spaces' expect (__bak_normalized 'file with spaces.20140817_234302.bak') --to-equal 'file with spaces'
end end
...@@ -44,7 +44,7 @@ function describe_bak -d 'Testing bak plugin' ...@@ -44,7 +44,7 @@ function describe_bak -d 'Testing bak plugin'
end end
end end
function it_unmoves_a_single_file function it_undo_moves_of_a_single_file
touch a touch a
mvbak a mvbak a
unmvbak (ls) unmvbak (ls)
...@@ -52,7 +52,7 @@ function describe_bak -d 'Testing bak plugin' ...@@ -52,7 +52,7 @@ function describe_bak -d 'Testing bak plugin'
expect (ls) --to-equal a expect (ls) --to-equal a
end end
function it_unmoves_multiple_files function it_undo_moves_of_multiple_files
set files (seq 4) set files (seq 4)
touch $files touch $files
mvbak $files mvbak $files
...@@ -80,7 +80,7 @@ function describe_bak -d 'Testing bak plugin' ...@@ -80,7 +80,7 @@ function describe_bak -d 'Testing bak plugin'
expect (ls) --to-contain $files $file_bak expect (ls) --to-contain $files $file_bak
end end
function it_uncopies_a_single_file function it_undo_copies_of_a_single_file
touch a touch a
cpbak a cpbak a
rm a rm a
...@@ -89,7 +89,7 @@ function describe_bak -d 'Testing bak plugin' ...@@ -89,7 +89,7 @@ function describe_bak -d 'Testing bak plugin'
expect (ls) --to-contain (echo 'a'\n(__bak_name a)) expect (ls) --to-contain (echo 'a'\n(__bak_name a))
end end
function it_uncopies_multiple_files function it_undo_copies_of_multiple_files
set files (seq 4) set files (seq 4)
touch $files touch $files
mvbak $files mvbak $files
...@@ -98,7 +98,7 @@ function describe_bak -d 'Testing bak plugin' ...@@ -98,7 +98,7 @@ function describe_bak -d 'Testing bak plugin'
expect (ls) --to-equal "$files" expect (ls) --to-equal "$files"
end end
function it_uncopies_a_directory function it_undo_copies_of_a_directory
mkdir a mkdir a
cpbak a/ cpbak a/
rmdir a rmdir a
......
import plugins/fish-spec import plugins/fish-spec
function describe_fish-spec -d "Fish-Spec" function describe_fish-spec
function it_has_an_output_if_suite_is_blank function it_has_an_output_if_suite_is_blank
set -l suite " set -l suite "
import plugins/fish-spec import plugins/fish-spec
......
import plugins/fish-spec import plugins/fish-spec
function describe_oh_my_fish -d "Oh-My-Fish test spec..." function describe_oh_my_fish
function before_all function before_all
set -g fish_custom_bak $fish_custom set -g fish_custom_bak $fish_custom
set -g fish_plugins_bak $fish_plugins set -g fish_plugins_bak $fish_plugins
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment