You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a very useful feature and will be great to have official support. My current setup is using a shell script which is committing any Guard detected changes to temp git branch.
Will be great to abstract out GitRepo and SourceDiff so changed files may be provided from the different input sources like crystalball command arguments.
# Gemfile
group :test do
gem 'crystalball'
gem 'guard-rspec'
end
# Guardfile
group :spec do
require 'guard/compat/plugin'
SPEC_DIRS = ENV.fetch('SPEC_DIRS', 'spec').split
Guard::Compat::UI.info("spec_paths are #{SPEC_DIRS}")
common_options = {
all_on_start: true,
spec_paths: SPEC_DIRS
}
crystalball_options = common_options.merge(
cmd: 'bundle exec crystalball',
run_all: { cmd: 'CRYSTALBALL=true bundle exec rspec' },
failed_mode: :focus
)
git_options = common_options.merge(
cmd: './script/commit_changes.sh',
run_all: { cmd: './script/reset_temp_branch.sh' }
)
guard :rspec, git_options do
...
end
guard :rspec, crystalball_options do
...
end
end
Add a
--watch
that would run tests as Crystalball finds the changes in the source code.--fail-fast
The text was updated successfully, but these errors were encountered: