sauce-archives / sauce_ruby

This is the Ruby client adapter for testing with Sauce Labs, a Selenium-based browser testing service (saucelabs.com).
Apache License 2.0
98 stars 115 forks source link

Running Sauce Tests Locally #362

Open smythey21 opened 8 years ago

smythey21 commented 8 years ago

It would be nice to run my tests with :sauce => true local only. The swappable-sauce suggestion does enable me to run tests locally, but it still tries running my tests on SauceLabs. It would be nice to have a config setting that completely switches off all sauce functionality. Only way I've gotten this to work so far is by monkey patching the self.included method in SeleniumExampleGroup.

  module Sauce
    module RSpec
      module SeleniumExampleGroup
        def self.included(othermod)
        end
      end
    end
  end
anthonywoo commented 8 years ago

+1 for a real solution as well. The workaround I've been using is including Sauce::RSpec::SeleniumExampleGroup in my Rspec.configure if an ENV variable exists so I can control running it from command line