public
Description: Webrat - Ruby Acceptance Testing for Web applications
Homepage: http://gitrdoc.com/brynary/webrat/tree/master/
Clone URL: git://github.com/brynary/webrat.git
Better error message if Webrat mode is unknown
brynary (author)
Sun Dec 28 11:24:24 -0800 2008
commit  f409ec3ecb04593c400ac3217be9ef44ed25cdd6
tree    c96e78b78dfbb668c4f7597f2a4ab2856ae121d8
parent  61b864f1135e83cc7fab7d4ca7663fd1a861aeb8
...
24
25
26
27
 
 
 
 
 
 
 
 
 
 
 
28
29
30
...
24
25
26
 
27
28
29
30
31
32
33
34
35
36
37
38
39
40
0
@@ -24,7 +24,17 @@ module Webrat
0
     when :mechanize
0
       MechanizeSession
0
     else
0
-      raise WebratError.new("Unknown Webrat mode: #{Webrat.configuration.mode.inspect}")
0
+      raise WebratError.new(<<-STR)
0
+Unknown Webrat mode: #{Webrat.configuration.mode.inspect}
0
+
0
+Please ensure you have a Webrat configuration block that specifies a mode
0
+in your test_helper.rb, spec_helper.rb, or env.rb (for Cucumber).
0
+For example:
0
+
0
+  Webrat.configure do |config|
0
+    config.mode = :rails
0
+  end
0
+      STR
0
     end
0
   end
0
   

Comments