Permalink
Browse files

Update the rspec-2 example to include shortcut for Sinatra apps defin…

…ed in modular style.
  • Loading branch information...
1 parent 7d1971f commit 143810aa211b0b419546ab972ae1041df192848d @fgrehm fgrehm committed Feb 2, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 testing/rspec-2.md
View
@@ -18,6 +18,14 @@ RSpec 2.x
RSpec.configure { |c| c.include RSpecMixin }
+If your app was defined using the [modular style](http://www.sinatrarb.com/intro.html#Sinatra::Base%20-%20Middleware,%20Libraries,%20and%20Modular%20Apps), use
+
+ def app() described_class end
+
+instead of
+
+ def app() Sinatra::Application end
+
**Shared Example Groups**
[Shared Example Groups](http://relishapp.com/rspec/rspec-core/v/2-3/dir/example-groups/shared-example-group)

0 comments on commit 143810a

Please sign in to comment.