-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Launchy option to launch spec results instead of reading terminal output. #196
Conversation
Added notes for Launchy results launcher option.
Sounds like a very good idea thanks, but I can't merge it without specs, could you please add some? Thanks! |
Ok - I'll try. Sorry, I am still learning rspec and not yet proficient. |
Great, don't hesitate to ask question, I'll review your specs with pleasure! |
The execution flow is...
Could you help with the skeleton of how you would test this behavior? How do we test that rspec properly created the output file? How can we test that Launchy.open(<filename.html>) was actually called. Sorry, this is my first time writing rspec, and I am getting more proficient at model/view/controller spect, but testing system commands is way over my head. thanks! |
cmd_parts << "bundle exec" if bundle_exec? | ||
cmd_parts << rspec_executable | ||
cmd_parts << "--help" | ||
`#{cmd_parts.join(' ')}`.include? "--failure-exit-code" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation shouldn't change here no?
Regarding specs, the better is to mock
make sense to you? |
…Moved require Launchy call to within the block where launchy option is detected.
@@ -168,7 +176,7 @@ def run_via_drb(paths, options) | |||
rescue DRb::DRbConnError | |||
# Fall back to the shell runner; we don't want to mangle the environment! | |||
run_via_shell(paths, options) | |||
end | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no tab here, right?
expect(Launchy).to receive(:open).with("./tmp/test.html").and_return(true) | ||
subject.run(['spec'], options) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - this was way over my head! Always learning. Thanks for a killer gem - guard-rspec is awesome! Glad I could contribute!
Add `launchy' option to launch spec results instead of reading terminal output.
Thanks, version 3.1.0 released! |
Thanks for merging, and for helping me through the pull request process. |
The HTML format for rspec is beautiful. The master branch of guard-rspec does not have an option to launch the html output in a browser, as far as I can tell.
So I have implemented the :launchy option which will use Launchy to launch the rspec output file.
Please consider this feature as I think it will be valuable to many users to view the HTML format of rspec vs. the console output.
thanks!
Don