RSpec has this nice method to exclude individual tests/examples or whole 
groups by using filter_run_excluding in the config, then tagging the 
examples:

https://relishapp.com/rspec/rspec-core/v/3-7/docs/filtering/exclusion-filters

RSpec.configure do |c|
  c.filter_run_excluding :skip => trueend
RSpec.describe "something" do
  it "does one thing" do
  end

  it "does another thing", :skip => true do
  endend

"does one thing" will be checked, 
"does another thing" will not.


We are using this, for example, to skip some tests depending on the 
platform the test is run on by wrapping the c.filter_run_excluding :skip => 
true in an if block:

If Mac, 
   no exclusions, if Ubuntu, 
   exclude tests that do something with Xcode.


Right now the numbers of passing examples/test is just lower if the 
exclusion filter is used, but it would be nice to see the actual number of 
tests that are skipped.

Is there a way to get the number of tests skipped by this method during a 
test run?

Thanks,

Jan

-- 
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/3108ef8e-303d-425b-9b00-ab83dfec7633%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to