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
f34f1140
Commit
f34f1140
authored
Jan 10, 2015
by
Bruno Pinto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing plugin load from custom folder
parent
75ba7639
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
plugins/fish-spec/run_spec.fish
plugins/fish-spec/run_spec.fish
+2
-0
plugins/fish-spec/run_specs.fish
plugins/fish-spec/run_specs.fish
+2
-2
test/oh_my_fish.fish
test/oh_my_fish.fish
+14
-4
No files found.
plugins/fish-spec/run_spec.fish
View file @
f34f1140
function run_spec -a test
functions -q before_each; and before_each
eval $test
functions -q after_each; and after_each
end
function run_spec._.results.assertion_success -e assertion_success
...
...
plugins/fish-spec/run_specs.fish
View file @
f34f1140
...
...
@@ -5,7 +5,7 @@ function run_specs
end
# Run before all block
eval "before_all"
functions -q before_all; and before_all
# Run tests
for test in (functions -n | grep it_)
...
...
@@ -13,5 +13,5 @@ function run_specs
end
# Run after all block
eval "after_all"
functions -q after_all; and after_all
end
test/
test_oh-my-
fish.fish
→
test/
oh_my_
fish.fish
View file @
f34f1140
function describe_oh_my_fish
function before_
all
function before_
each
set -g fish_custom_bak $fish_custom
set -g fish_function_path_bak $fish_function_path
set -g fish_plugins_bak $fish_plugins
set -e fish_custom
end
function after_
all
function after_
each
set fish_custom $fish_custom_bak
set fish_function_path $fish_function_path_bak
set fish_plugins $fish_plugins_bak
...
...
@@ -18,13 +20,13 @@ function describe_oh_my_fish
end
function it_allows_the_custom_folder_location_to_be_customized
set fish_custom /tmp
set
-g
fish_custom /tmp
load_oh_my_fish
expect $fish_custom to_equal '/tmp'
end
function it_loads_all_custom_files
set fish_custom /tmp
set
-g
fish_custom /tmp
echo 'set -gx TEST_LOAD_CUSTOM_FILE file_loaded' > $fish_custom/test.load
load_oh_my_fish
...
...
@@ -48,6 +50,14 @@ function describe_oh_my_fish
expect $fish_function_path to_include $fish_path/plugins/z
end
function it_loads_plugins_from_custom_folder
array.delete "$fish_custom/plugins/example" fish_function_path
set fish_plugins example
load_oh_my_fish
expect $fish_function_path to_include $fish_custom/plugins/example
end
function it_loads_the_selected_theme
array.delete "$fish_path/themes/l" fish_function_path
...
...
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