Dockerfile test require directive unable to find the correct module
<p>I am trying to write a basic test of an Ubuntu 16.04 docker image.
My testing environment is Ubuntu 16.04 also and I have installed the <code>ruby-serverspec</code> package.</p>

<pre><code>require "serverspec"
require "docker_image"

describe "Dockerfile" do
  before(:all) do
    image = Docker::Image.build_from_dir('..')

    set :os, family: :debian
    set :backend, :docker
    set :docker_image, image.id
  end

  it "installs the right version of Ubuntu" do
    expect(os_version).to include("Ubuntu 14")
  end

  def os_version
    command("lsb_release -a").stdout
  end
end
</code></pre>

<p>This is a deliberately failing test for now, as it checks for Ubuntu 14, but it is not even reaching the failure.</p>

<pre><code>$ rspec /test/spec/localhost/my_spec.rb    
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- docker_image (LoadError)
    from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /test/spec/localhost/my_spec.rb:4:in `&lt;top (required)&gt;'
    from /usr/lib/ruby/vendor_ruby/rspec/core/configuration.rb:1361:in `load'
    from /usr/lib/ruby/vendor_ruby/rspec/core/configuration.rb:1361:in `block in load_spec_files'
    from /usr/lib/ruby/vendor_ruby/rspec/core/configuration.rb:1359:in `each'
    from /usr/lib/ruby/vendor_ruby/rspec/core/configuration.rb:1359:in `load_spec_files'
    from /usr/lib/ruby/vendor_ruby/rspec/core/runner.rb:106:in `setup'
    from /usr/lib/ruby/vendor_ruby/rspec/core/runner.rb:92:in `run'
    from /usr/lib/ruby/vendor_ruby/rspec/core/runner.rb:78:in `run'
    from /usr/lib/ruby/vendor_ruby/rspec/core/runner.rb:45:in `invoke'
    from /usr/bin/rspec:4:in `&lt;main&gt;'
</code></pre>

<p>I am unaware of how to require the <code>Docker::Image</code> class module correctly.
The search path is still a black art to me. How can I get this test to fail as expected?</p>