rspec-cells 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: faffe32056bfc67d7ddc815e986fa9d42c026c2c
4
- data.tar.gz: 3cdeeddcc2ee6886b21a54c66653f9c0c2e1e0b6
3
+ metadata.gz: 82183ffcbebeb8ae42aa604d38f0ccc156e3e1f0
4
+ data.tar.gz: 47ea6cdfd59eabe643714d0fa2d483daedf16dc8
5
5
  SHA512:
6
- metadata.gz: db129d7829f94e409fc748ac6fafcec7e46d5872cc2af4adeaf5afc0c2768c657e44a2de138d6b4e1937352fe115fb8bd55395373019d7fb1b7c5d27c0d41d62
7
- data.tar.gz: 90460bb09026b6fe498e8d93b48b6b8ab9214e057f56c8776403e626764e5c6966390d8b0666985f107e6cc1defb576d66627948309394b7ea585475d4b792f6
6
+ metadata.gz: 4dfd2791cd1a01fe309d238959bdb7f2edac185b9e5c06ffa7bd7b863d23c5db9c02f9f25e2f81ea8a740699ad477bb29f0e6ce6fd0735f9ae6fdf8d4effc8d8
7
+ data.tar.gz: 7f426354b63764010d5dcfaaeada105bc0d27adccf8b74e9fd639773c3080f1677c1de003113f717687e53bffcbe47c2b35f46b4f52f49a37d9aaafd1c5b0726
data/CHANGES.textile CHANGED
@@ -1,3 +1,9 @@
1
+ h2. 0.1.10
2
+
3
+ * Don't use `have_selector` in generated spec unless Capybara's around.
4
+ * Less restricted dependencies.
5
+
6
+
1
7
  h2. 0.1.9
2
8
 
3
9
  * Override #render_state in specs using module in favour of Decorator (broke stubbing).
data/README.rdoc CHANGED
@@ -48,8 +48,13 @@ After preparing the instance you can use +render_state+ for triggering the state
48
48
 
49
49
  If you want Capybara's string matchers be sure to bundle at least capybara +0.4.1+ in your Gemfile.
50
50
 
51
- gem "capybara", "~> 0.4.1"
51
+ group :development, :test do
52
+ gem "capybara", "~> 0.4.1"
53
+ end
54
+
55
+ In order to make the cells test generator work properly, capybara needs to be in both groups.
52
56
 
57
+
53
58
  You can then use capybara's matchers in your cell spec.
54
59
 
55
60
  describe PostsCell do
@@ -19,8 +19,8 @@ describe <%= class_name %>Cell do
19
19
  it { should have_selector("h1", :text => "<%= class_name %>#<%= state %>") }
20
20
  it { should have_selector("p", :text => "Find me in app/cells/<%= file_path %>/<%= state %>.html") }
21
21
  <%- else -%>
22
- it { should have_selector("h1", :content => "<%= class_name %>#<%= state %>") }
23
- it { should have_selector("p", :content => "Find me in app/cells/<%= file_path %>/<%= state %>.html") }
22
+ it { should include "<%= class_name %>#<%= state %>" }
23
+ it { should include "Find me in app/cells/<%= file_path %>/<%= state %>.html" }
24
24
  <%- end -%>
25
25
  end
26
26
  <%- unless index == actions.length - 1 -%>
@@ -1,6 +1,6 @@
1
1
  module RSpec
2
2
  module Cells
3
- VERSION = '0.1.9'
3
+ VERSION = '0.1.10'
4
4
  end
5
5
  end
6
6
 
data/rspec-cells.gemspec CHANGED
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  $:.unshift File.expand_path("../lib", __FILE__)
3
2
  require "rspec/cells/version"
4
3
 
@@ -11,6 +10,7 @@ Gem::Specification.new do |s|
11
10
  s.homepage = "http://rubygems.org/gems/rspec-cells"
12
11
  s.summary = %q{Spec your cells.}
13
12
  s.description = %q{Use render_cell in your specs.}
13
+ s.license = 'MIT'
14
14
 
15
15
  s.rubyforge_project = "rspec-cells"
16
16
 
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_runtime_dependency(%q<railties>, ['>= 3.0', '< 4.1'])
23
- s.add_runtime_dependency(%q<rspec-rails>, ["~> 2.2"])
24
- s.add_runtime_dependency(%q<cells>, ["~> 3.4"])
22
+ s.add_runtime_dependency "railties", ">= 3.0"
23
+ s.add_runtime_dependency "rspec-rails", ">= 2.2.0"
24
+ s.add_runtime_dependency "cells", ">= 3.4.0"
25
25
  end
@@ -89,16 +89,16 @@ describe Rspec::Generators::CellGenerator do
89
89
  it 'creates display state' do
90
90
  test.assert_file "spec/cells/twitter_cell_spec.rb", t('context "rendering display" do')
91
91
  test.assert_file "spec/cells/twitter_cell_spec.rb", t('subject { render_cell(:twitter, :display) }')
92
- test.assert_file "spec/cells/twitter_cell_spec.rb", t('it { should have_selector("h1", :content => "Twitter#display") }')
93
- test.assert_file "spec/cells/twitter_cell_spec.rb", t('it { should have_selector("p", :content => "Find me in app/cells/twitter/display.html") }')
92
+ test.assert_file "spec/cells/twitter_cell_spec.rb", t('it { should include "Twitter#display" }')
93
+ test.assert_file "spec/cells/twitter_cell_spec.rb", t('it { should include "Find me in app/cells/twitter/display.html" }')
94
94
  test.assert_file "spec/cells/twitter_cell_spec.rb", t('end')
95
95
  end
96
96
 
97
97
  it 'creates form state' do
98
98
  test.assert_file "spec/cells/twitter_cell_spec.rb", t('context "rendering form" do')
99
99
  test.assert_file "spec/cells/twitter_cell_spec.rb", t('subject { render_cell(:twitter, :form) }')
100
- test.assert_file "spec/cells/twitter_cell_spec.rb", t('it { should have_selector("h1", :content => "Twitter#form") }')
101
- test.assert_file "spec/cells/twitter_cell_spec.rb", t('it { should have_selector("p", :content => "Find me in app/cells/twitter/form.html") }')
100
+ test.assert_file "spec/cells/twitter_cell_spec.rb", t('it { should include "Twitter#form" }')
101
+ test.assert_file "spec/cells/twitter_cell_spec.rb", t('it { should include "Find me in app/cells/twitter/form.html" }')
102
102
  test.assert_file "spec/cells/twitter_cell_spec.rb", t('end')
103
103
  end
104
104
  end
@@ -133,16 +133,16 @@ describe Rspec::Generators::CellGenerator do
133
133
  it 'creates display state' do
134
134
  test.assert_file GENERATED_FILE, t('context "rendering display" do')
135
135
  test.assert_file GENERATED_FILE, t('subject { render_cell("forum/comment", :display) }')
136
- test.assert_file GENERATED_FILE, t('it { should have_selector("h1", :content => "Forum::Comment#display") }')
137
- test.assert_file GENERATED_FILE, t('it { should have_selector("p", :content => "Find me in app/cells/forum/comment/display.html") }')
136
+ test.assert_file GENERATED_FILE, t('it { should include "Forum::Comment#display" }')
137
+ test.assert_file GENERATED_FILE, t('it { should include "Find me in app/cells/forum/comment/display.html" }')
138
138
  test.assert_file GENERATED_FILE, t('end')
139
139
  end
140
140
 
141
141
  it 'creates form state' do
142
142
  test.assert_file GENERATED_FILE, t('context "rendering form" do')
143
143
  test.assert_file GENERATED_FILE, t('subject { render_cell("forum/comment", :form) }')
144
- test.assert_file GENERATED_FILE, t('it { should have_selector("h1", :content => "Forum::Comment#form") }')
145
- test.assert_file GENERATED_FILE, t('it { should have_selector("p", :content => "Find me in app/cells/forum/comment/form.html") }')
144
+ test.assert_file GENERATED_FILE, t('it { should include "Forum::Comment#form" }')
145
+ test.assert_file GENERATED_FILE, t('it { should include "Find me in app/cells/forum/comment/form.html" }')
146
146
  test.assert_file GENERATED_FILE, t('end')
147
147
  end
148
148
  end
data/spec/spec_helper.rb CHANGED
@@ -5,6 +5,7 @@ require 'bundler/setup'
5
5
  require "rails/all"
6
6
  require 'rspec-cells'
7
7
  require 'rspec/rails'
8
+ require 'cell/base'
8
9
  require 'cell/test_case'
9
10
  require 'rspec/rails/example/cell_example_group'
10
11
 
metadata CHANGED
@@ -1,63 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-cells
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-12 00:00:00.000000000 Z
11
+ date: 2014-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.0'
20
- - - <
21
- - !ruby/object:Gem::Version
22
- version: '4.1'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '3.0'
30
- - - <
31
- - !ruby/object:Gem::Version
32
- version: '4.1'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: rspec-rails
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
- - - ~>
31
+ - - ">="
38
32
  - !ruby/object:Gem::Version
39
- version: '2.2'
33
+ version: 2.2.0
40
34
  type: :runtime
41
35
  prerelease: false
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
- - - ~>
38
+ - - ">="
45
39
  - !ruby/object:Gem::Version
46
- version: '2.2'
40
+ version: 2.2.0
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: cells
49
43
  requirement: !ruby/object:Gem::Requirement
50
44
  requirements:
51
- - - ~>
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
- version: '3.4'
47
+ version: 3.4.0
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
51
  requirements:
58
- - - ~>
52
+ - - ">="
59
53
  - !ruby/object:Gem::Version
60
- version: '3.4'
54
+ version: 3.4.0
61
55
  description: Use render_cell in your specs.
62
56
  email:
63
57
  - apotonick@gmail.com
@@ -65,8 +59,8 @@ executables: []
65
59
  extensions: []
66
60
  extra_rdoc_files: []
67
61
  files:
68
- - .gitignore
69
- - .travis.yml
62
+ - ".gitignore"
63
+ - ".travis.yml"
70
64
  - CHANGES.textile
71
65
  - Gemfile
72
66
  - MIT-LICENSE
@@ -84,7 +78,8 @@ files:
84
78
  - spec/cells/cell_spec_spec.rb
85
79
  - spec/spec_helper.rb
86
80
  homepage: http://rubygems.org/gems/rspec-cells
87
- licenses: []
81
+ licenses:
82
+ - MIT
88
83
  metadata: {}
89
84
  post_install_message:
90
85
  rdoc_options: []
@@ -92,18 +87,21 @@ require_paths:
92
87
  - lib
93
88
  required_ruby_version: !ruby/object:Gem::Requirement
94
89
  requirements:
95
- - - '>='
90
+ - - ">="
96
91
  - !ruby/object:Gem::Version
97
92
  version: '0'
98
93
  required_rubygems_version: !ruby/object:Gem::Requirement
99
94
  requirements:
100
- - - '>='
95
+ - - ">="
101
96
  - !ruby/object:Gem::Version
102
97
  version: '0'
103
98
  requirements: []
104
99
  rubyforge_project: rspec-cells
105
- rubygems_version: 2.0.3
100
+ rubygems_version: 2.2.1
106
101
  signing_key:
107
102
  specification_version: 4
108
103
  summary: Spec your cells.
109
- test_files: []
104
+ test_files:
105
+ - spec/cells/cell_generator_spec.rb
106
+ - spec/cells/cell_spec_spec.rb
107
+ - spec/spec_helper.rb