I would like to know how to write unit tests for a module that is mixed into a couple of classes but don\'t quite know how to go about it:
Do I test the instanc
What I like to do is create a new host class and mix the module into it, something like this:
describe MyModule do
let(:host_class) { Class.new { include MyModule } }
let(:instance) { host_class.new }
describe '#instance_method' do
it 'does something' do
expect(instance.instance_method).to do_something
end
end
end