rspec-cells 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c8733ae3469683a588166e7bb8f0e24758dd470
4
- data.tar.gz: 597e81d72fdcc89b20b0e252219cadf6de0971a1
3
+ metadata.gz: 56f487987a67db8939f7ec081f5e8f97ad68e966
4
+ data.tar.gz: 10d001095c0ee5e10378c0b7ab8bcbd15d6fcd81
5
5
  SHA512:
6
- metadata.gz: e3cfb958af2295053d3d80562e00833a0f23edeabca70cd5e316a971009d0f1fb25a72602141591ba4a754842aed40a3c50d416b0a87c3ca40994a5b59f36cef
7
- data.tar.gz: 0fa145a8582e43efac7d0012bf381366c4f493519704d4852cd5683080f6ec7bdfd51a5a338b4d5663803a200adf340c4106c8adb32e692d58ba3bf345849013
6
+ metadata.gz: c9700c2a5c4e7d5ded496352c6031e3ddde7a60bd5048652699943ad52af56cdada93a79f18f662477d874f3c99b023b0f42a8093d4b50bca3fc1f38aed0af14
7
+ data.tar.gz: ae63ec7d84d9806d498bccdae66c4fd95397d60b73e281d63c4b81165b82078886f72596bb936e36ffd05aa98f5ff013ba86053de9b237ba75d24fe3bac72117
data/CHANGES.textile CHANGED
@@ -1,3 +1,7 @@
1
+ h2. 0.2.5
2
+
3
+ * No deprecations in Rails 4.2.
4
+
1
5
  h2. 0.2.4
2
6
 
3
7
  * Fix Rspec 3.3 fixture support.
@@ -66,13 +66,22 @@ module RSpec::Rails
66
66
 
67
67
  def method_missing(method, *args, &block)
68
68
  # Send the route helpers to the application router.
69
- if @routes && @routes.named_routes.helpers.include?(method)
69
+ if route_defined?(method)
70
70
  @controller.send(method, *args, &block)
71
71
  else
72
72
  super
73
73
  end
74
74
  end
75
75
 
76
+ def route_defined?(method)
77
+ return false unless @routes
78
+ if @routes.named_routes.respond_to?(:route_defined?)
79
+ @routes.named_routes.route_defined?(method)
80
+ else
81
+ @routes.named_routes.helpers.include?(method)
82
+ end
83
+ end
84
+
76
85
  included do
77
86
  metadata[:type] = :cell
78
87
  before do # called before every it.
@@ -1,6 +1,6 @@
1
1
  module RSpec
2
2
  module Cells
3
- VERSION = '0.2.4'
3
+ VERSION = '0.2.5'
4
4
  end
5
5
  end
6
6
 
data/lib/rspec/cells.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'cell/test_case'
2
+
2
3
  require 'rspec/core'
3
- require 'rspec/rails/adapters'
4
- require 'rspec/rails/fixture_support'
5
- require 'rspec/rails/example/rails_example_group'
4
+ # We only require the "index file" of `rspec-rails` to avoid file structure change
5
+ require 'rspec/rails'
6
6
  require 'rspec/cells/cell_example_group'
7
7
  require 'rspec/cells/caching'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-cells
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-25 00:00:00.000000000 Z
11
+ date: 2015-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -108,12 +108,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project: rspec-cells
111
- rubygems_version: 2.2.2
111
+ rubygems_version: 2.4.8
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Spec your cells.
115
- test_files:
116
- - spec/cells/caching_spec.rb
117
- - spec/cells/cell_generator_spec.rb
118
- - spec/cells/cell_spec_spec.rb
119
- - spec/spec_helper.rb
115
+ test_files: []