Sha256: d43aa445870fb7e62643e8e4028d57f72b36d8894e5f15f1b5c07f3bd896ae35

Contents?: true

Size: 1.67 KB

Versions: 38

Compression:

Stored size: 1.67 KB

Contents

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

module Cucumber
  module Rake

    describe Task::ForkedCucumberRunner do

      let(:libs) { ['lib'] }
      let(:binary) { Cucumber::BINARY }
      let(:cucumber_opts) { ['--cuke-option'] }
      let(:feature_files) { ['./some.feature'] }

      context "when running with bundler" do

        let(:bundler) { true }

        subject { Task::ForkedCucumberRunner.new(
            libs, binary, cucumber_opts, bundler, feature_files) }

        it "does use bundler if bundler is set to true" do
          subject.use_bundler.should be_true
        end

        it "uses bundle exec to find cucumber and libraries" do
          subject.cmd.should == [Cucumber::RUBY_BINARY,
                                 '-S',
                                 'bundle',
                                 'exec',
                                 'cucumber',
                                 '--cuke-option'] + feature_files
        end

      end

      context "when running without bundler" do

        let(:bundler) { false }

        subject { Task::ForkedCucumberRunner.new(
            libs, binary, cucumber_opts, bundler, feature_files) }

        it "does not use bundler if bundler is set to false" do
          subject.use_bundler.should be_false
        end

        it "uses well known cucumber location and specified libraries" do
          subject.cmd.should == [Cucumber::RUBY_BINARY,
                                 "-I",
                                 "\"lib\"",
                                 "\"#{Cucumber::BINARY }\"",
                                 "--cuke-option"] + feature_files
        end

      end


    end

  end
end

Version data entries

38 entries across 36 versions & 9 rubygems

Version Path
candlepin-api-0.4.0 bundle/ruby/1.8/gems/cucumber-1.2.1/spec/cucumber/rake/forked_spec.rb
candlepin-api-0.4.0 bundle/ruby/gems/cucumber-1.2.1/spec/cucumber/rake/forked_spec.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/cucumber-1.2.1/spec/cucumber/rake/forked_spec.rb
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/cucumber-1.2.1/spec/cucumber/rake/forked_spec.rb
librarian-puppet-0.9.8 vendor/gems/ruby/1.9.1/gems/cucumber-1.2.1/spec/cucumber/rake/forked_spec.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/cucumber-1.2.1/spec/cucumber/rake/forked_spec.rb
casecumber-1.0.2.1 spec/cucumber/rake/forked_spec.rb
casecumber-1.2.1.cb2 spec/cucumber/rake/forked_spec.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/cucumber-1.2.1/spec/cucumber/rake/forked_spec.rb
cucumber-1.2.1 spec/cucumber/rake/forked_spec.rb
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/rake/forked_spec.rb
ftl-0.2.0 vendor/bundle/gems/cucumber-1.2.0/spec/cucumber/rake/forked_spec.rb
cucumber-1.2.0 spec/cucumber/rake/forked_spec.rb
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/rake/forked_spec.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/rake/forked_spec.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/rake/forked_spec.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/rake/forked_spec.rb
frameworks-capybara-0.2.0.rc2 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/rake/forked_spec.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/rake/forked_spec.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/rake/forked_spec.rb