Never mind. I guess something about invoking the cucumber binary left
out a whole bunch of required dependencies. I was about to fix this by
putting the following code in the rakefile and invoke the tests from
there:

require 'cucumber'
require 'cucumber/rake/task'

namespace :spec do

...

  desc "Run the Cucumber features"
  Cucumber::Rake::Task.new(:integration) do |t|
    t.cucumber_opts = "features --format pretty"
  end

On Sat, Feb 12, 2011 at 4:39 PM, Carl Youngblood <c...@youngbloods.org> wrote:
> I'm writing a radiant extension and wanting to use cucumber to test
> some of my controllers and views. Since the extension generator seemed
> to generate some pretty outdated cucumber stuff, I decided to generate
> a standard rails app and run the cucumber rails generator on it, just
> to see what kind of code it produced. I then copied this code into my
> extension. In env.rb, it has this line near the top:
>
> require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
>
> I updated this line to point to the right place, since the code is
> running inside my extension. I also invoke cucumber using a rake task,
> which uses bundler to include all the necessary Radiant stuff.
>
> However, upon running this task, I get the following error:
>
> uninitialized constant Radiant::Configuration::RADIANT_ROOT (NameError)
>
> I'm confused by this, because radiant has already been required in the
> context of the Rakefile. I even added the radiant stuff again to the
> top of the cucumber env.rb file, just in case. But it didn't seem to
> help.
>
> Anyone have any ideas for where I might be going wrong?
>
> Thanks,
> Carl
>

Reply via email to