title: Buildr, RSpec—pass build parameter to test
body: <p>I have »buildr« »buildfile« which triggers some »rspec« tests. I would like to pass some path parameters to the tests, so that It wont cause trouble to load test-resources files. In the »buildfile« I have got this code to trigger the tests:</p>
  
  <pre><code>RSpec.configure do |config|
      config.add_setting :spec_resources_dir, :default =&gt; _(:src, 'spec', 'ruby', 'resources')
  end
  
  RSpec::Core::RakeTask.new(:run_rspec) do |t|
    t.pattern = 'src/spec/**/*_spec.rb'
  end
  task test =&gt; [:run_rspec]
  </code></pre>
  
  <p>But if I try to retrieve the value in the specfile like this:</p>
  
  <pre><code>RSpec.configuration.spec_resources_dir
  </code></pre>
  
  <p>I get this error</p>
  
  <pre><code>undefined method `spec_resources_dir' […] (NoMethodError)
  </code></pre>
  
  <p>Any ideas?</p>