File: example_multiple_db.feature

package info (click to toggle)
ruby-database-cleaner 1.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 768 kB
  • sloc: ruby: 4,854; makefile: 10; sh: 4
file content (23 lines) | stat: -rw-r--r-- 702 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Feature: example
 In order to test DataBase Cleaner
 Here are some scenarios that rely on the DB being clean!

  # Background:
  #   Given I have setup DatabaseCleaner to clean multiple databases
  #
  Scenario: dirty the db
    When I create a widget in one db
     And I create a widget in another db
    Then I should see 1 widget in one db
     And I should see 1 widget in another db

  Scenario: assume a clean db
    When I create a widget in one db
    Then I should see 1 widget in one db
     And I should see 0 widget in another db

  Scenario: assume a clean db
    When I create a widget in another db
    Then I should see 0 widget in one db
     And I should see 1 widget in another db