spec/gnawrnip/step_screenshot_spec.rb in gnawrnip-0.3.0 vs spec/gnawrnip/step_screenshot_spec.rb in gnawrnip-0.3.1
- old
+ new
@@ -16,19 +16,25 @@
end
subject { template.build(example) }
context 'has multiple data' do
- let(:paths) { ['/path/to/A.png', '/path/to/B.png', '/path/to/C.png'] }
+ let(:paths) do
+ [
+ double(path: '/path/to/A.png'),
+ double(path: '/path/to/B.png'),
+ double(path: '/path/to/C.png')
+ ]
+ end
it 'should get image tag and source that base64 encoded' do
should include '<div class="screenshot animation">'
should include '<div class="nav">'
end
end
context 'has single data' do
- let(:paths) { ['/path/to/A.png'] }
+ let(:paths) { [double(path: '/path/to/A.png')] }
it do
should include '<div class="screenshot">'
should_not include '<div class="nav">'
end
end