rspec-cells 0.3.2 → 0.3.3

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: 1632cd4d7920d1673c4205ac06a0c42984936dd6
4
- data.tar.gz: 2e4d1ff66a84a43bf86a3ab907e761816f0d839e
3
+ metadata.gz: d553b20aa9bd6b0c7abaf128bab9a3470b36e984
4
+ data.tar.gz: be38f9acddd569c55145ea2cdc1156baa0d94e03
5
5
  SHA512:
6
- metadata.gz: e0f03c8abea68185039f8c31d7c7a925b87f734dd635c553e09973f036dcea2700d70c411f225a68cd18a5182a69522ee26c3ac5662c8fcea7a2d4aa88b804c2
7
- data.tar.gz: 1bc38912b08475adb5e67cdf052ae1d6d9c7671cac402b03b29a3429c286cd50c50364f5b10c6e860b6529717fbe456e750c6b19140ed5f1ecfb4eff925b1ff8
6
+ metadata.gz: f45cadb315d27807c0909fe079fd1b9eed7b85f3805b31ef27930b182bf49d502c831f5979c0a84caaefe2cb2ccf1ea8d5ded7975cc2172acd053a9567003f65
7
+ data.tar.gz: 49476021f3e7758022ef44d64c12545a4231f9612720fba54b74dcbadecd0ef9baa7a6c550e7387ff22c2a4245c6a267ac832c41d32362ebdd6598894abc4ebe
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.3.3
2
+
3
+ * Maintenance release to make it work with rspec-rails 3.3.
4
+
1
5
  # 0.3.2
2
6
 
3
7
  * Bugfix: In 0.3.1, I included cells specific `#controller` code into every Rspec example. Thanks to @psynix for spotting this within minutes.
@@ -2,6 +2,7 @@ require 'cell/testing'
2
2
 
3
3
  require 'rspec/core'
4
4
  require 'rspec/rails/adapters'
5
+ require 'rspec/rails/fixture_support'
5
6
  require 'rspec/rails/example/rails_example_group'
6
7
  require 'rspec/cells/example_group'
7
8
  require 'rspec/cells/caching'
@@ -36,22 +36,18 @@ module RSpec
36
36
  ActionController::Base.allow_forgery_protection = false
37
37
  end
38
38
 
39
- # add Example::controller and ::controller_class. for some reasons, this doesn't get imported from Cell::Testing.
40
- extend RSpec::Cells::ExampleGroup::ControllerClass
39
+ # add Example::controller and ::controller_class.
40
+ extend RSpec::Cells::ExampleGroup::Controller
41
+ let (:controller_class) { }
42
+ let (:controller) { controller_for(controller_class) }
41
43
  end
42
44
 
43
45
 
44
- # DISCUSS: in MiniTest, this is done via inheritable_attr. Doesn't work in Rspec, though.
45
- module ControllerClass
46
- def controller_class
47
- @controller_class
48
- end
49
-
50
- def controller(name)
51
- @controller_class = name
46
+ module Controller
47
+ def controller(name) # DSL for test, e.g. `controller SongsController`.
48
+ let (:controller_class) { name }
52
49
  end
53
50
  end
54
-
55
51
  end
56
52
  end
57
53
  end
@@ -1,6 +1,6 @@
1
1
  module RSpec
2
2
  module Cells
3
- VERSION = "0.3.2"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  end
6
6
 
@@ -17,7 +17,8 @@ Gem::Specification.new do |s|
17
17
  s.require_paths = ["lib"]
18
18
 
19
19
  s.add_runtime_dependency 'rspec-rails', '~> 3.2'
20
- s.add_runtime_dependency "cells", "~> 4.0.0.beta"
20
+ s.add_runtime_dependency "cells", "~> 4.0.0.beta5"
21
21
 
22
- # s.add_development_dependency "capybara" # FIXME: please make test for Capybara run.
22
+
23
+ s.add_development_dependency "capybara" # FIXME: please make test for Capybara run.
23
24
  end
@@ -17,7 +17,6 @@ class SongCell < Cell::ViewModel
17
17
  end
18
18
 
19
19
  describe "Cell::Testing in specs", type: :cell do
20
-
21
20
  describe "#cell" do
22
21
  it { expect(cell(:dummy).call).to have_text("I'm Dummy.") }
23
22
 
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.3.2
4
+ version: 0.3.3
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-05-28 00:00:00.000000000 Z
11
+ date: 2015-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-rails
@@ -30,14 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 4.0.0.beta
33
+ version: 4.0.0.beta5
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 4.0.0.beta
40
+ version: 4.0.0.beta5
41
+ - !ruby/object:Gem::Dependency
42
+ name: capybara
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  description: Use render_cell in your specs.
42
56
  email:
43
57
  - apotonick@gmail.com
@@ -91,4 +105,8 @@ rubygems_version: 2.2.2
91
105
  signing_key:
92
106
  specification_version: 4
93
107
  summary: Spec your cells.
94
- test_files: []
108
+ test_files:
109
+ - spec/cells/caching_spec.rb
110
+ - spec/cells/cell_generator_spec.rb
111
+ - spec/cells/cell_spec_spec.rb
112
+ - spec/spec_helper.rb