Sha256: 4f7af5efc58b46b481b5731febe11bc4c249d14aad50c08669ee0295368fe792

Contents?: true

Size: 1.66 KB

Versions: 1

Compression:

Stored size: 1.66 KB

Contents

Feature: Generate rspec
  In order to use rspec in my ruby project
  As a developer
  I want to generate the rspec boilerplate in my project
  
  Scenario: Run `bddgen rspec` in an empty project
    Given a current working directory named "myproject"
    When I run "bddgen rspec"
    Then the following files should be created:
      | spec/spec_helper.rb |
      | Gemfile             |
      | Rakefile            |
    And the file "spec/spec_helper.rb" should match the template "spec/spec_helper.rb"
    And the file "Gemfile" should contain exactly:
      """
      source 'http://rubygems.org'
      
      gem 'rake'
      gem 'rspec'
      
      """
    And the file "Rakefile" should contain the bundler setup
    And the file "Rakefile" should contain the rspec tasks
    
    Scenario: Run `bddgen rspec` in a project with an existing Gemfile
      Given a current working directory named "myproject"
      And a file named "Gemfile" with:
        """
        source 'http://custom.com'
        gem 'special'
        """
      When I run "bddgen rspec"
      Then the file "Gemfile" should contain exactly:
        """
        source 'http://custom.com'
        gem 'special'
        gem 'rspec'
        
        """

    Scenario: Run `bddgen rspec` in a project with an existing Rakefile
      Given a current working directory named "myproject"
      And a file named "Rakefile" with:
        """
        require 'custom'
        require 'special'
        """
      When I run "bddgen rspec"
      Then the file "Rakefile" should contain "require 'custom'"
      And the file "Rakefile" should contain "require 'special'"
      And the file "Rakefile" should contain the rspec tasks

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bddgen-0.3.0 features/generate_rspec.feature