blob: 5b6eaa13e9c3524e55a3007edcbb427673d8d6f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
describe QA::Factory::Product do
let(:factory) do
Class.new(QA::Factory::Base) do
attribute :test do
'block'
end
attribute :no_block
end.new
end
let(:product) { spy('product') }
let(:product_location) { 'http://product_location' }
subject { described_class.new(factory) }
before do
factory.web_url = product_location
end
describe '.visit!' do
it 'makes it possible to visit fabrication product' do
allow_any_instance_of(described_class)
.to receive(:visit).and_return('visited some url')
expect(subject.visit!).to eq 'visited some url'
end
end
end
|