-
Notifications
You must be signed in to change notification settings - Fork 24
Refactored, so the call to "require 'spec_helper'" is no longer needed in each spec file. #26
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
Refactored, so the call to "require 'spec_helper'" is no longer needed in each spec file. #26
Conversation
@javornikolov any concerns/comments on this change? |
I think |
empty_directory 'spec/factories' | ||
directory 'spec', 'spec' |
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 is that doing? (Is it related to the require spec_helper change?)
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 is because the templates directory contained the content of spec
directory to initialise project with.
After the change, project is simply initialised with the spec
folder contained within the templates
.
Additionally a file .rspec
is added to the project root.
All the files that existed in lib/plsql/spec/templates
were moved to lib/plsql/spec/templates/spec
Good spot. I did not check before. The --require option was included since 2.14 |
…le: .rspec The file contains a require, so the spec_helper is always required. This way when writing tests, the spec helper no longer needs to be explicitly required.
bf4126b
to
f8d10e2
Compare
empty_directory 'spec/factories' | ||
copy_file '.rspec', '.rspec' |
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.
Fixed a bug. The file though defined was not copied by cli.rb
@javornikolov I've added fixes and a test for new file. |
I think there is no strict policy for backward compatibility. It may be tricky - depends on users' environments. But to be honest - in this case:
Also I think rspec < 2.4 is not working with latest ruby. So I guess we're not breaking anything significant by this change. |
All test were passing after my latest fix. |
|
Thanks. It's a pleasure. |
…erences Refactored, so the call to "require 'spec_helper'" is no longer needed in each spec file.
Call to plsql-spec init now creates additional file:
.rspec in the project root directory.
The file contains a require, so the spec_helper is always required.
This way when writing tests, the spec helper no longer needs to be explicitly required.