Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added some more cucumbery goodness

  • Loading branch information...
commit c53e66309d01486a6f18de3977f1ca8dd07d5511 1 parent 15a7131
Theo Hultberg and Jonas Nicklas authored committed
Showing with 17 additions and 1 deletion.
  1. +17 −1 lib/webcat/cucumber.rb
18 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
Please sign in to comment.
Something went wrong with that request. Please try again.