module RSpecAspic::InstanceMethods

Public Instance Methods

fixture(name, value, &block) click to toggle source
# 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) click to toggle source
# File lib/rspec-aspic.rb, line 7
def the(attribute, &block)
  context "#{attribute}" do
    subject { eval("#{attribute}") }
    it(&block)
  end
end