title: Getting problems while using cucumber for BDD in rails 3
body: <p>I am writing BDD using cucumber for my Rails app but getting problems while running 'cucumber'</p>
  
  <p>My database for test is "test_db". When I run cucumber features/my_Feature_file.feature, it show scenarios pass or fail but along with, It is also cleaning my database.</p>
  
  <p>I am newbie to cucumber. So please tell me that it is default for testing that when you run cucumber, then database will be cleaned. <strong>Like If I am writing BDD for user login, So if there will be no any record then how my steps will check that User is valid or not?</strong></p>
  
  <p>I am using:</p>
  
  <p>Gemfile (for test)-</p>
  
  <pre><code>group :test do
    gem 'ZenTest'
    gem 'autotest-rails'
    gem 'autotest-growl'
    gem 'selenium'
    gem 'selenium-client'
    gem 'capybara'
    gem 'database_cleaner'
    gem 'cucumber-rails'
    gem 'cucumber'
    gem 'rspec-rails'
    gem 'spork'
    gem 'xpath'
    gem 'launchy'
    gem 'cucumber-sinatra'
    gem 'webrat'
  end
  </code></pre>
  
  <p>features/support/env.rb-</p>
  
  <pre><code>require 'cucumber/rails'
  Capybara.default_selector = :css
  ActionController::Base.allow_rescue = false
  
  begin
    DatabaseCleaner.strategy = :transaction
    #DatabaseCleaner.strategy = nil
  rescue NameError
    raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
  end
  
  Cucumber::Rails::Database.javascript_strategy = :truncation
  </code></pre>
  
  <p>I tried using:</p>
  
  <blockquote>
    <p>DatabaseCleaner.strategy = nil</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>Cucumber::Rails::World.use_transactional_fixtures = false</p>
  </blockquote>
  
  <p><em>Can someone clear my confusions and guide me to the right way? Help is highly appreciated.</em></p>