Module: Protest
- Defined in:
- lib/protest/rails.rb
Defined Under Namespace
Modules: Rails
Class Method Summary collapse
-
.context(description, &block) ⇒ Object
(also: describe)
The preferred way to declare a context (top level) is to use
Protest.describe
orProtest.context
, which will ensure you’re using rails adapter with the helpers you need. -
.story(description, &block) ⇒ Object
Use
Protest.story
to declare an integration test for your rails app.
Class Method Details
.context(description, &block) ⇒ Object Also known as: describe
The preferred way to declare a context (top level) is to use Protest.describe
or Protest.context
, which will ensure you’re using rails adapter with the helpers you need.
64 65 66 |
# File 'lib/protest/rails.rb', line 64 def self.context(description, &block) Rails::TestCase.context(description, &block) end |
.story(description, &block) ⇒ Object
Use Protest.story
to declare an integration test for your rails app. Note that the files should still be called ‘test/integration/foo_test.rb’ if you want the ‘test:integration’ rake task to pick them up.
71 72 73 |
# File 'lib/protest/rails.rb', line 71 def self.story(description, &block) Rails::IntegrationTest.story(description, &block) end |