-
Notifications
You must be signed in to change notification settings - Fork 12
Setup the initial build for rspec-autotest #1
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
Conversation
(ping @myronmarston @alindeman @samphippen etc) |
I'll try to review this tonight... |
❤️ Sorry to hassle you, just making sure it got found.:) |
# Derived from the `Autotest` class, extends the `autotest` command to work | ||
# with RSpec. | ||
# | ||
class Autotest::Rspec2 < Autotest |
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.
Should this be RSpec
or Rspec
? (I suppose it should be whatever it was before....)
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.
This was Autotest::Rspec2
before
autotest will automatically require autotest/rspec2 but having this in rspec-autotest this will conflict with rspec-core so both autotest/rspec2 files will automatically require rspec/autotest
@myronmarston I've checked this with running the following tests:
|
👍 Works for me. |
|
||
spec.required_ruby_version = '>= 1.8.7' | ||
|
||
spec.add_dependency "rspec-core", ">= 2.9.9" |
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.
This should be 2.99
not, 2.9.9
. They mean different things.
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.
Quite right, good spot!
#{'*'*50} | ||
EOS | ||
exit(1) | ||
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.
Why does this file need to be here? It adds duplication with rspec-core, and will add complication when we remove rspec/autorun
...
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.
Because I couldn't think of a way to correctly determine the absolute path to rspec-core's executable and we are referencing it at
rspec-autotest/lib/rspec/autotest.rb
Line 13 in 96411a0
RSPEC_EXECUTABLE = File.expand_path('../../../exe/rspec', __FILE__) |
rspec-autotest/lib/rspec/autotest.rb
Line 53 in 96411a0
%|#{prefix}"#{ruby}"#{suffix} -S "#{RSPEC_EXECUTABLE}" --tty #{normalize(files_to_test).keys.flatten.map { |f| %|"#{f}"|}.join(' ')}| |
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.
What if rspec-core
exposed it via a public API?
Something like RSpec::Core.path_to_executable
?
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.
Done, I don't have admin access to the repo but can we get TravisCI setup on this? (I can't flick the switch as a contributor) and we also need to set master
as the main branch (Github thinks this branch is mainline atm it seems)
BTW, I went ahead and pushed a version of this to rubygems.org just to ensure we get the name rspec-autotest (I can imagine someone squatting on it after seeing this new repo appear). |
Setup the initial build for rspec-autotest
As a PR