How can I mix a module into an rspec context (aka describe), such that the module\'s constants are available to the spec?
describe
module Foo FOO = 1 end
You can use RSpec's shared_context:
shared_context
shared_context 'constants' do FOO = 1 end describe Model do include_context 'constants' p FOO # => 1 end