-
-
Notifications
You must be signed in to change notification settings - Fork 1k
generator for system spec #1933
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
I think you need to make sure these specs only run on rails versions that support system specs. |
@andrzejsliwa #2071 looks like a good candidate for including this PR |
No this can be independant, it just needs to be gated on Rails version |
class SystemGenerator < Base | ||
class_option :system_specs, :type => :boolean, :default => true, :desc => "Generate system specs" | ||
|
||
def generate_feature_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.
should this be generate_system_spec
?
class_option :system_specs, :type => :boolean, :default => true, :desc => "Generate system specs" | ||
|
||
def generate_feature_spec | ||
return unless options[:system_specs] |
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.
@andrzejsliwa perhaps you'll have something more elegant in mind, but inserting something like this is a start:
begin
raise ArgumentError.new('System Tests are available for Rails >= 5.1') if Rails::VERSION::STRING < '5.1'
rescue ArgumentError => e
puts e.message
end
Thanks @JonRowe. Dropped a something to jumpstart the conversation again. |
Closed via: #2075 thanks @andrzejsliwa and @joshRpowell 🎉 |
Merged via rspec#2075
Merged via rspec#2075
Rspec since 3.7 is supporting the system specs, so would be great to add generator for it.