Blueprints 2.0: instance variables

9 views
Skip to first unread message

Andrius Chamentauskas

unread,
Nov 7, 2011, 5:44:17 PM11/7/11
to blueprints
I'm planning on removing using of instance variables when defining
blueprints. Instead blueprints will be defined like this:
blueprint :sample1 do
set :sample, 'sample'
end
# In test
build :sample1
sample.should == 'sample'

Of course implicit setting will be available too:
blueprint :sample2 do
'sample'
end
# In test
build :sample2
sample2.should == 'sample'

I'm also planning on extending rspec/test-unit/cucumber world objects
with method `set`
# In test
set :sample1, 'sample'
sample1.should == 'sample'
Reply all
Reply to author
Forward
0 new messages