blob: f09a0c922aee5ef30f61f5c30306c2a9c98c90b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
require 'spec_helper'
describe VariablePresenter do
let(:variable) { double(:variable, foo: 'bar') }
subject do
described_class.new.with_subject(variable)
end
describe '#initialize' do
it 'takes a variable and optional params' do
expect { subject }.
not_to raise_error
end
it 'exposes variable' do
expect(subject.variable).to eq(variable)
end
it 'does not forward missing methods to variable' do
expect { subject.foo }.to raise_error(NoMethodError)
end
end
end
|