Sha256: e7fb197c2c23a14db9d75ca8eae83e0e1fb5f1309a136bfb83fdb9b42ee60478

Contents?: true

Size: 1.46 KB

Versions: 6

Compression:

Stored size: 1.46 KB

Contents

require 'spec_helper'

# Generators are not automatically loaded by Rails
require 'generators/cucumber/install/install_generator'

describe Cucumber::InstallGenerator do
  # Tell the generator where to put its output (what it thinks of as Rails.root)
  destination File.expand_path("../../../../../tmp", __FILE__)

  before { prepare_destination }

  describe 'no arguments' do
    before { run_generator  }

    describe 'config/cucumber.yml' do
      subject { file('config/cucumber.yml') }
      it { should exist }
      it { should contain "default: <%= std_opts %> features" }
    end

    describe 'features/step_definitions folder' do
      subject { file('features/step_definitions') }
      it { should exist }
    end

    describe 'features/support/env.rb' do
      subject { file('features/support/env.rb') }
      it { should exist }
      it { should contain "# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril." }
      it { should contain "require 'cucumber/rails'" }
    end

    describe 'lib/tasks/cucumber.rake' do
      subject { file('lib/tasks/cucumber.rake') }
      it { should exist }
      it { should contain "# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril." }
      it { should contain "task :cucumber => 'cucumber:ok'" }
    end

    describe 'script/cucumber' do
      subject { file('script/cucumber') }
      it { should exist }
      it { should contain "load Cucumber::BINARY" }
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cucumber-rails-1.4.0 spec/generators/cucumber/install/install_generator_spec.rb
cucumber-rails-1.3.1 spec/generators/cucumber/install/install_generator_spec.rb
cucumber-rails-1.3.0 spec/generators/cucumber/install/install_generator_spec.rb
cucumber-rails-1.2.1 spec/generators/cucumber/install/install_generator_spec.rb
cucumber-rails-1.2.0 spec/generators/cucumber/install/install_generator_spec.rb
cucumber-rails-1.1.1 spec/generators/cucumber/install/install_generator_spec.rb