radiant/example/features/support/env.rb in metry-1.1.0 vs radiant/example/features/support/env.rb in metry-1.2.0
- old
+ new
@@ -17,10 +17,11 @@
require 'rack/test'
World(Rack::Test::Methods)
$: << RAILS_ROOT + '/../../vendor/webrat/lib'
require 'webrat'
+require 'webrat/rack_test'
Webrat.configure do |config|
config.mode = :rack_test
end
@@ -38,9 +39,14 @@
else
ActiveRecord::Base.__send__(:increment_open_transactions)
end
@__cucumber_ar_connection.begin_db_transaction
ActionMailer::Base.deliveries = [] if defined?(ActionMailer::Base)
+
+ Layout.create!(:name => "basic", :content => <<EOC)
+<r:content />
+EOC
+ User.create!(:name => "Administrator", :login => "admin", :password => "radiant", :password_confirmation => "radiant", :admin => true)
end
After do
@__cucumber_ar_connection.rollback_db_transaction
if @__cucumber_ar_connection.respond_to?(:decrement_open_transactions)