Rspec =begin =end

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Rspec =begin =end

Ralph Shnelvar
Rspec =begin =end I don't know if this is a Rails, Ruby, or Rspec question.

In a file named spec/spec_helper.rb I have
RSpec.configure do |config|
# The settings below are suggested to provide a good initial experience
# with RSpec, but feel free to customize to your heart's content.
=begin
 # These two settings work together to allow you to limit a spec run
 # to individual examples or groups you care about by tagging them with
 # `:focus` metadata. When nothing is tagged with `:focus`, all examples
 # get run.
 config.filter_run :focus
 config.run_all_when_everything_filtered = true
. . .
 # See https://stackoverflow.com/questions/38421853/why-is-my-rspec-not-loading-devisetestcontrollerhelpers
 config.include Devise::Test::ControllerHelpers, :type => :controller
=end

What does the =begin and =end do?  Is this new Ruby syntax?  Rails preprocessing?  Rspec preprocessing?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1081148413.20170710145836%40dos32.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rspec =begin =end

Mugurel Chirica
That is a multi line ruby comment, but it's not that popular, you are better off using multiple single line comments #comment.
The reason is there is so you can remove them and that block will have the comments and the config.filter_run :focus (...) lines working properly.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL37D8GP1tV5Qi1R66n2d94zBNOi0%2BiTZuzyGN9ihQhFMExigg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...