spec/dummy/app/controllers/dummy_controller.rb in cacheable_flash-0.2.9 vs spec/dummy/app/controllers/dummy_controller.rb in cacheable_flash-0.2.10
- old
+ new
@@ -1,11 +1,22 @@
-class DummyController < ApplicationController
- include CacheableFlash
- def index
- expected_flash = {
- 'errors' => "This is an Error",
- 'notice' => "This is a Notice"
- }
- flash[:errors] = expected_flash['errors']
- flash[:notice] = expected_flash['notice']
- end
-end
+class DummyController < ApplicationController
+ include CacheableFlash
+ def index
+ expected_flash = {
+ 'errors' => "This is an Error",
+ 'notice' => "This is a Notice"
+ }
+ flash[:errors] = expected_flash['errors']
+ flash[:notice] = expected_flash['notice']
+ end
+
+ def error
+ expected_flash = {
+ 'errors' => "This is a real Error",
+ }
+ flash[:errors] = expected_flash['errors']
+ end
+
+ def no_flash
+ # Does not set any flash
+ end
+end