Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
O
oh-my-fish
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
oh-my-fish
Commits
9a7292ac
Commit
9a7292ac
authored
Jan 17, 2015
by
Bruno Pinto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fail tests when using an invalid comparison
parent
4b8b4b91
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
plugins/fish-spec/expect.fish
plugins/fish-spec/expect.fish
+2
-0
plugins/fish-spec/spec/expect.spec.fish
plugins/fish-spec/spec/expect.spec.fish
+14
-0
spec/oh-my-fish.spec.fish
spec/oh-my-fish.spec.fish
+3
-3
No files found.
plugins/fish-spec/expect.fish
View file @
9a7292ac
...
@@ -78,6 +78,8 @@ function expect
...
@@ -78,6 +78,8 @@ function expect
test "$expected" = "$actual"
test "$expected" = "$actual"
case --to-not-equal
case --to-not-equal
test "$expected" != "$actual"
test "$expected" != "$actual"
case \*
test true = false
end
end
set result $status
set result $status
...
...
plugins/fish-spec/spec/expect.spec.fish
0 → 100644
View file @
9a7292ac
import plugins/fish-spec
function describe_expect
function before_each
set -e result
end
function it_is_false_when_comparison_does_not_exist
echo (expect true --invalid-comparison; set result $status) >/dev/null
expect $result --to-equal 1
end
end
spec.run $argv
spec/oh-my-fish.spec.fish
View file @
9a7292ac
...
@@ -16,13 +16,13 @@ function describe_oh_my_fish
...
@@ -16,13 +16,13 @@ function describe_oh_my_fish
function it_has_a_default_custom_directory
function it_has_a_default_custom_directory
set -e fish_custom
set -e fish_custom
load_oh_my_fish
load_oh_my_fish
expect $fish_custom --to-eq "$HOME/.oh-my-fish/custom"
expect $fish_custom --to-eq
ual
"$HOME/.oh-my-fish/custom"
end
end
function it_allows_the_custom_folder_location_to_be_customized
function it_allows_the_custom_folder_location_to_be_customized
set -g fish_custom /tmp
set -g fish_custom /tmp
load_oh_my_fish
load_oh_my_fish
expect $fish_custom --to-eq '/tmp'
expect $fish_custom --to-eq
ual
'/tmp'
end
end
function it_loads_all_custom_files
function it_loads_all_custom_files
...
@@ -30,7 +30,7 @@ function describe_oh_my_fish
...
@@ -30,7 +30,7 @@ function describe_oh_my_fish
echo 'set -gx TEST_LOAD_CUSTOM_FILE file_loaded' > $fish_custom/test.load
echo 'set -gx TEST_LOAD_CUSTOM_FILE file_loaded' > $fish_custom/test.load
load_oh_my_fish
load_oh_my_fish
expect $TEST_LOAD_CUSTOM_FILE --to-eq 'file_loaded'
expect $TEST_LOAD_CUSTOM_FILE --to-eq
ual
'file_loaded'
end
end
function it_loads_all_oh_my_fish_functions
function it_loads_all_oh_my_fish_functions
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment