wisper-rspec
wisper-rspec copied to clipboard
Use the new Wisper::Testing gem to provide faking of events based on rspec tags
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
Would be better to add this code directly to this gem since it is related only to RSpec.