Module: RSpecAspic::InstanceMethods
- Defined in:
- lib/rspec-aspic.rb
Instance Method Summary collapse
Instance Method Details
#fixture(name, value, &block) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/rspec-aspic.rb', line 14 def fixture(name, value, &block) context "with the fixture #{name} : #{value.inspect}" do let(name) { value } subject { send(name) } self.instance_exec &block end end |
#the(attribute, &block) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/rspec-aspic.rb', line 7 def the(attribute, &block) context "#{attribute}" do subject { eval("#{attribute}") } it(&block) end end |