On Thu, Nov 14, 2013 at 7:23 PM, Nalesso Moreira <[email protected]> wrote:

> Hi Myron,
> thanks for your response, somehow not very helpful.
> This does not seam to be the best solution, as these files
> are under the directory spec/dummy/spec ( i.e a rails app called dummy
> using rspec ),
> I would have to add a tag to any group example that I do not want rspec to
> run.
>

Myron's suggestion will exclude any examples in files that have "dummy" in
their path without having to tag anything. Did you try it?


> On Thursday, 14 November 2013 17:25:27 UTC, Myron Marston wrote:
>
>> In my opinion, this adds complexity for what is very much a niche use
>> case.  As far as I know, you're the first user to ever report an issue like
>> this :).  Also, you can already achieve this using a snippet like this:
>>
>> RSpec.configure do |c|
>>   c.filter_run_excluding :example_group => lambda { |metadata|
>>     metadata[:file_path].include?('dummy')
>>   }
>> end
>>
>> On Thursday, November 14, 2013 8:44:31 AM UTC-8, [email protected]:
>>>
>>> Seams reasonable, but the devil is in the details. Go ahead and submit a
>>> PR and see what the team thinks.
>>>
>>> Cheers,
>>> David
>>>
>>> Sent from my iPhone
>>>
>>> On Nov 14, 2013, at 11:06 AM, Nalesso Moreira <[email protected]> wrote:
>>>
>>> Hi David,
>>> Thanks for your response.
>>>
>>> Do you think rspec-core should provide an options like this?
>>> I am going to submit a PR on github with this feature implemented.
>>>
>>> With regards,
>>> Nalesso Antonio
>>>
>>> On Wednesday, 13 November 2013 11:24:01 UTC, [email protected] wrote:
>>>>
>>>> There's currently no exception feature, but rspec loads all files
>>>> matching the glob pattern "spec/**/*_spec.rb" by default (run "rspec
>>>> --help" to see the command line options). This can be overridden on the
>>>> command line or in .rspec (or ~/.rspec). So given:
>>>>
>>>> $ ls spec
>>>> dummy foo bar
>>>> $ rspec --pattern "spec/{foo,bar}/**/*_spec.rb"
>>>>
>>>> Depending on your shell and your glob fu, there might be a way to
>>>> exclude the spec/dummy directory using a negation, but I haven't figured
>>>> out how to do that yet.
>>>>
>>>> HTH,
>>>> David
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Nov 12, 2013 at 11:24 PM, Nalesso Moreira <[email protected]>wrote:
>>>>
>>>>> Hi there,
>>>>> My test suite is failing because rspec is loading the tests of a rails
>>>>> dummy
>>>>> app located in spec/dummy/spec/**/*.rb.
>>>>>
>>>>> Here is a better explanation:
>>>>>
>>>>> Given a dir spec
>>>>> And I have a rails app in spec/dummy
>>>>> When I run rspec command
>>>>> Then rspec should not load tests in spec/dummy/spec/**/*.rb
>>>>> And all my tests mustt pass
>>>>>
>>>>> Does anybody know how I could sort of add_exception like autotest
>>>>> does not to fetch/load this particular dir?
>>>>>
>>>>> With regards,
>>>>> Nalesso Moreira
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "rspec" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To post to this group, send email to [email protected].
>>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>>> msgid/rspec/0a23b642-d0df-4493-9f53-d78752989e5a%40googlegroups.com.
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>
>>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "rspec" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/rspec/f56c2425-3f06-4f04-af99-e2eae02e5aad%40googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>  --
> You received this message because you are subscribed to the Google Groups
> "rspec" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rspec/599385e7-fd1c-4323-b1b7-7d9761eca641%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/CAKw-oWQTv4DpRb1Xr%3D_%3DVsLDMSvd1FQVRNp3-LNhaQ%3D9%2BHeCpg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to