Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

rspec shared examples

# declare the shared example
shared_examples 'foo' do
	it 'passes do
    	expect(true).to be true
	end
end

context 'using the shared example' do
	include_examples 'foo'
end
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #rspec #shared #examples
ADD COMMENT
Topic
Name
1+4 =