Permalink
Browse files

Added some more cucumbery goodness

  • Loading branch information...
1 parent 15a7131 commit c53e66309d01486a6f18de3977f1ca8dd07d5511 Theo Hultberg and Jonas Nicklas committed with jnicklas Nov 16, 2009
Showing with 17 additions and 1 deletion.
  1. +17 −1 lib/webcat/cucumber.rb
View
@@ -1,4 +1,20 @@
require 'webcat'
require 'webcat/dsl'
-World(Webcat)
+World(Webcat)
+
+After do
+ Webcat.reset_sessions!
+end
+
+require 'database_cleaner'
+require 'database_cleaner/cucumber'
+DatabaseCleaner.strategy = :truncation
+
+Before('@javascript') do
+ Webcat.current_driver = Webcat.javascript_driver
+end
+
+After('@javascript') do
+ Webcat.use_default_driver
+end

0 comments on commit c53e663

Please sign in to comment.