wisper-rspec icon indicating copy to clipboard operation
wisper-rspec copied to clipboard

Use the new Wisper::Testing gem to provide faking of events based on rspec tags

Open krisleech opened this issue 10 years ago • 1 comments

Add Wisper::Testing as a dependency. Provide an example usage in the README, such as:

RSpec.configure do |config|
  config.before(:each) do |example|
    Wisper.clear

    if example.metadata[:wisper] == :fake
      Wisper::Testing.fake!
    elsif example.metadata[:wisper] == :inline
      Wisper::Testing.inline!
    elsif example.metadata[:type] == :feature
      Wisper::Testing.inline!
     else
      Wisper::Testing.fake!
    end
  end
end

krisleech avatar Aug 02 '15 23:08 krisleech

Would be better to add this code directly to this gem since it is related only to RSpec.

krisleech avatar Aug 06 '17 12:08 krisleech