lib/bogus/rspec/syntax.rb in bogus-0.1.5 vs lib/bogus/rspec/syntax.rb in bogus-0.1.6
- old
+ new
@@ -6,9 +6,12 @@
extend Forwardable
takes :context
def_delegators :context, :before, :after, :described_class
def described_class=(value)
+ # for new RSpec (> 3.0)
+ context.metadata[:described_class] = value
+ # for old RSpec (< 3.0)
context.example.metadata[:example_group][:described_class] = value
end
def after_suite(&block)
RSpec.configure do |config|