Sha256: d503979785b8af5d88e0a2496060e688c3375627ab6ece088312750cf9550726

Contents?: true

Size: 973 Bytes

Versions: 1

Compression:

Stored size: 973 Bytes

Contents

Feature: Emulate Javascript

  Scenario: See a widget
    Given I have created a new Rails 3 app "widgets" with cucumber-rails support
    And I successfully run `rails generate scaffold widget name:string`
    And I write to "features/f.feature" with:
      """
      @javascript
      Feature: Widget inventory
        Scenario: Delete a widget
          Given there is a widget named "wrench"
          When I go to the widgets page
          Then I should see "wrench"
      """
    And I write to "features/step_definitions/s.rb" with:
      """
      Given /^there is a widget named "([^"]*)"$/ do |name|
        Factory(:widget, :name => name)
      end
      """
    And I write to "features/support/factories.rb" with:
      """
      Factory.define :widget do |f| 
        f.name 'testwidget'
      end
      """
    When I run `rake db:migrate cucumber`
    Then it should pass with:
       """
       1 scenario (1 passed)
       3 steps (3 passed)
       """

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cucumber-rails-0.5.1 features/emulate_javascript.feature