Displaying 4 results from an estimated 4 matches for "databaseclean".
Did you mean:
databasecleaner
2012 Feb 13
11
stale records with integration testing?
Hi,
I was writing an integration test for my user signup form (with
capybara), and found that my test was failing due to a validation error:
"email is already taken". I''m a bit confused because I thought when I
run "rspec spec/some_spec.rb", the test database would be wiped clear?
Is that not the case?
Patrick J. Collins
http://collinatorstudios.com
2011 Feb 08
1
Why use DatabaseCleaner with rSpec?
Hi list,
I''ve used DatabaseCleaner in the past, but only when using Cucumber
and Selenium (or Steak + Celerity) since turning on
transactional_fixtures would prevent the data being accessible from
app-server that is also triggered for the tests. This works fine, and
is a de-facto solution for this problem.
I don''t see wh...
2010 Dec 02
1
Global before blocks - filtering by multiple types
Hi
in the config block of rspec I have a before block to reset my
database before each spec:
config.before(:each) {DatabaseCleaner.clean}
I know I can apply this before to a specific type, e.g.
config.before(:each, :type => :model) {DatabaseCleaner.clean}
but what I want to achieve is that the database is cleaned for all
specs except acceptance specs. Is there a way to define this, e.g.
something like:
config.before(:...
2011 Dec 05
1
How to extend common helper methods to view specs?
...root.join("spec/support/**/*.rb")].each {|f| require f}
RSpec.configure do |config|
config.include Devise::TestHelpers, :type => :controller
config.extend ControllerMacros, :type => :view
config.extend ControllerMacros, :type => :controller
config.before(:suite) do
DatabaseCleaner.strategy = :transaction
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
end
end
---------- spec/spec_helper.rb end --------------------------
i am already extending it to the...