Last active
September 21, 2017 01:40
-
-
Save abhchand/658c39d5205c8b56a7928fc9bd00e9e7 to your computer and use it in GitHub Desktop.
Blog Post: The interactor design pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function run_changed_specs { | |
arg=$1 | |
branch=${arg:-master} | |
files=$(git diff $branch..HEAD --name-only | grep spec | grep -v spec_helper.rb) | |
echo "===" | |
echo "Running files changed since $branch:" | |
echo $files | |
echo "" | |
rspec $(echo $files | tr '\n' ' ') | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> run_changed_specs | |
=== | |
Running files changed since master: | |
spec/features/admin/creating_a_user.rb spec/models/user_spec.rb spec/services/users/create_user_service.rb | |
Randomized with seed 46260 | |
.................. | |
Finished in 9.46 seconds (files took 1.39 seconds to load) | |
18 examples, 0 failures | |
Randomized with seed 46260 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment