peck-on-rails 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/peck_on_rails.rb +9 -2
  2. metadata +2 -2
data/lib/peck_on_rails.rb CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  require 'active_support/testing/assertions'
4
4
  require 'active_support/testing/deprecation'
5
- require 'active_support/testing/isolation'
6
5
  require 'active_support/core_ext/kernel/reporting'
7
6
  require 'active_support/deprecation'
8
7
  require 'rails/backtrace_cleaner'
@@ -114,7 +113,7 @@ class Peck
114
113
  def templates
115
114
  # Force body to be read in case the template is being streamed
116
115
  response.body
117
- @templates.keys
116
+ (@templates || @_templates).keys
118
117
  end
119
118
 
120
119
  def body
@@ -244,6 +243,14 @@ class Peck
244
243
  ].each do |klass|
245
244
  klass.send(:init, context, context_type, subject)
246
245
  end
246
+
247
+ context.before do
248
+ setup_fixtures if respond_to?(:setup_fixtures)
249
+ end
250
+
251
+ context.after do
252
+ teardown_fixtures if respond_to?(:teardown_fixtures)
253
+ end
247
254
  end
248
255
  end
249
256
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peck-on-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-28 00:00:00.000000000 Z
12
+ date: 2013-07-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: peck