rspec-cells 0.3.8 → 0.3.9

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
  SHA256:
3
- metadata.gz: c866f909d1b6da97832fe4ecf035ae7d2fcb0c0844040fc79c35572575c2435c
4
- data.tar.gz: 59523ec4b954d808e05c575bc6ceb0fa4e5b44eb63ea1419f69b4876a537b075
3
+ metadata.gz: bf62d800ea17acf815401de7ceb4e9b7bf1d2d910e6e3af277684393290c30ef
4
+ data.tar.gz: d08025489d78c4cbc400bfe3e5035e4bf949a4435f1089df241e8841221daee4
5
5
  SHA512:
6
- metadata.gz: b102965874aa6a058dbffe79b66ae0ea7ece4f3258232fdce77e5c60bf1b91354d52b5f3721f6d68f4a36afefc7d6d3fec4fc1478f8ce0293d5790332cd1f75b
7
- data.tar.gz: 2b0b0c454e7032c646fd8b3ed54c44b51f7b8b85d1cadb8ac8810c6e35c9bb0af742d5460f203eabe6a6b9c685566a118ecdbf92bb0f353e18f1a4e661a7e16c
6
+ metadata.gz: 317c85a74fcc1ec459e69af92c019c6cc1072d11f26d55d193bf234fdd1a11441a27aa4231b3460a3a895ceb2ded57a26c65f186da1c1c8f79bcb275f4f7927a
7
+ data.tar.gz: 2c941ba6e026ba260b8c69d1cdc9d15db9a6fa9ae8dedf98a9256bb34b14aa666da581032a73ecccf2c7546f8e0e3636e2477f4560f3c853218bb3f0df0470b5
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.3.9
2
+
3
+ * Allow rspec-rails >= 6.2.0.
4
+
1
5
  # 0.3.8
2
6
 
3
7
  * Allow rspec-rails 6.0
@@ -1,6 +1,6 @@
1
1
  module RSpec
2
2
  module Cells
3
- VERSION = "0.3.8"
3
+ VERSION = "0.3.9"
4
4
  end
5
5
  end
6
6
 
data/rspec-cells.gemspec CHANGED
@@ -21,12 +21,14 @@ Gem::Specification.new do |s|
21
21
  "wiki_uri" => "https://github.com/trailblazer/rspec-cells/wiki",
22
22
  }
23
23
 
24
- s.files = `git ls-files`.split("\n")
25
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
26
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
24
+ s.files = Dir.chdir(__dir__) do
25
+ `git ls-files -z`.split("\x0").reject do |file|
26
+ file.start_with?(*%w[.git Appraisals Gemfile Rakefile gemfiles spec])
27
+ end
28
+ end
27
29
  s.require_paths = ["lib"]
28
30
 
29
- s.add_runtime_dependency 'rspec-rails', ">= 3.0.0", "< 6.1.0"
31
+ s.add_runtime_dependency 'rspec-rails', ">= 3.0.0", "< 6.2.0"
30
32
  s.add_runtime_dependency "cells", ">= 4.0.0", "< 6.0.0"
31
33
 
32
34
 
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.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-01 00:00:00.000000000 Z
11
+ date: 2023-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-rails
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 3.0.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: 6.1.0
22
+ version: 6.2.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 3.0.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: 6.1.0
32
+ version: 6.2.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: cells
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -85,17 +85,9 @@ executables: []
85
85
  extensions: []
86
86
  extra_rdoc_files: []
87
87
  files:
88
- - ".github/workflows/ci.yml"
89
- - ".gitignore"
90
- - Appraisals
91
88
  - CHANGES.md
92
- - Gemfile
93
89
  - MIT-LICENSE
94
90
  - README.md
95
- - Rakefile
96
- - gemfiles/rspec_rails_4_0.gemfile
97
- - gemfiles/rspec_rails_5_0.gemfile
98
- - gemfiles/rspec_rails_6_0.gemfile
99
91
  - lib/generators/rspec/cell_generator.rb
100
92
  - lib/generators/rspec/templates/cell_spec.erb
101
93
  - lib/rspec-cells.rb
@@ -105,21 +97,17 @@ files:
105
97
  - lib/rspec/cells/tasks.rake
106
98
  - lib/rspec/cells/version.rb
107
99
  - rspec-cells.gemspec
108
- - spec/cells/caching_spec.rb
109
- - spec/cells/cell_generator_spec.rb
110
- - spec/cells/cell_spec_spec.rb
111
- - spec/spec_helper.rb
112
100
  homepage: https://github.com/trailblazer/rspec-cells
113
101
  licenses:
114
102
  - MIT
115
103
  metadata:
116
104
  bug_tracker_uri: https://github.com/trailblazer/rspec-cells/issues
117
105
  changelog_uri: https://github.com/trailblazer/rspec-cells/blob/master/CHANGES.md
118
- documentation_uri: https://www.rubydoc.info/gems/rspec-cells/0.3.8
106
+ documentation_uri: https://www.rubydoc.info/gems/rspec-cells/0.3.9
119
107
  homepage_uri: https://github.com/trailblazer/rspec-cells
120
- source_code_uri: https://github.com/trailblazer/rspec-cells/tree/v0.3.8
108
+ source_code_uri: https://github.com/trailblazer/rspec-cells/tree/v0.3.9
121
109
  wiki_uri: https://github.com/trailblazer/rspec-cells/wiki
122
- post_install_message:
110
+ post_install_message:
123
111
  rdoc_options: []
124
112
  require_paths:
125
113
  - lib
@@ -134,12 +122,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
122
  - !ruby/object:Gem::Version
135
123
  version: '0'
136
124
  requirements: []
137
- rubygems_version: 3.3.18
138
- signing_key:
125
+ rubygems_version: 3.2.3
126
+ signing_key:
139
127
  specification_version: 4
140
128
  summary: Spec your cells.
141
- test_files:
142
- - spec/cells/caching_spec.rb
143
- - spec/cells/cell_generator_spec.rb
144
- - spec/cells/cell_spec_spec.rb
145
- - spec/spec_helper.rb
129
+ test_files: []
@@ -1,42 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- pull_request:
5
- branches:
6
- - master
7
- paths-ignore:
8
- - 'README.md'
9
- push:
10
- branches:
11
- - master
12
- paths-ignore:
13
- - 'README.md'
14
-
15
- jobs:
16
- test:
17
- name: Test (Ruby ${{ matrix.ruby }} with ${{ matrix.gemfile }})
18
- strategy:
19
- fail-fast: false
20
- matrix:
21
- ruby:
22
- - '2.5'
23
- - '2.6'
24
- - '2.7'
25
- - '3.0'
26
- - '3.1'
27
- - 'head'
28
- gemfile:
29
- - gemfiles/rspec_rails_4_0.gemfile
30
- - gemfiles/rspec_rails_5_0.gemfile
31
- - gemfiles/rspec_rails_6_0.gemfile
32
- env:
33
- BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
34
- runs-on: ubuntu-latest
35
- steps:
36
- - uses: actions/checkout@v3
37
- - uses: ruby/setup-ruby@v1
38
- with:
39
- ruby-version: ${{ matrix.ruby }}
40
- bundler-cache: true
41
- - name: RSpec
42
- run: bundle exec rake spec
data/.gitignore DELETED
@@ -1,5 +0,0 @@
1
- .idea/
2
- *.lock
3
- *.gem
4
- /.rvmrc
5
- spec/tmp
data/Appraisals DELETED
@@ -1,12 +0,0 @@
1
-
2
- appraise "rspec_rails_4_0" do
3
- gem "rspec-rails", "~> 4.0"
4
- end
5
-
6
- appraise "rspec_rails_5_0" do
7
- gem "rspec-rails", "~> 5.0"
8
- end
9
-
10
- appraise "rspec_rails_6_0" do
11
- gem "rspec-rails", "~> 6.0"
12
- end
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
data/Rakefile DELETED
@@ -1,7 +0,0 @@
1
- require 'bundler'
2
- Bundler::GemHelper.install_tasks
3
- require 'rspec/core/rake_task'
4
-
5
- desc "Run all specs"
6
- RSpec::Core::RakeTask.new(:spec)
7
- task :default => :spec
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rspec-rails", "~> 4.0"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rspec-rails", "~> 5.0"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rspec-rails", "~> 6.0"
6
-
7
- gemspec path: "../"
@@ -1,13 +0,0 @@
1
- require 'spec_helper'
2
-
3
- RSpec.describe 'Caching', type: :cell do
4
- let(:subject) { self.class }
5
-
6
- it 'module is included' do
7
- expect(subject.included_modules).to include(RSpec::Cells::Caching)
8
- end
9
-
10
- it { expect(subject).to respond_to(:enable_cell_caching!) }
11
- it { expect(subject).to respond_to(:disable_cell_caching!) }
12
-
13
- end
@@ -1,126 +0,0 @@
1
- require "spec_helper"
2
- require "generators/rspec/cell_generator"
3
-
4
- describe Rspec::Generators::CellGenerator do
5
- include RSpec::Rails::RailsExampleGroup
6
-
7
- attr_accessor :test_case, :test
8
-
9
- DESTINATION_ROOT = File.expand_path("../../tmp", __FILE__)
10
-
11
- before(:all) do
12
- test_case = Class.new(Rails::Generators::TestCase)
13
- test_case.destination_root = DESTINATION_ROOT
14
- test_case.generator_class = Rspec::Generators::CellGenerator
15
- self.test = test_case.new :wow
16
- end
17
-
18
- def t(line_code)
19
- Regexp.new(Regexp.escape(line_code))
20
- end
21
-
22
- context "When defined Capybara" do
23
- before(:all) do
24
- test.run_generator %w(Twitter display form)
25
- end
26
-
27
- after(:all) do
28
- FileUtils.rm_rf(DESTINATION_ROOT) # Cleanup after we are done testing
29
- # Object.send(:remove_const, :"Capybara")
30
- end
31
-
32
- it "creates widget spec" do
33
- test.assert_file "spec/cells/twitter_cell_spec.rb", t("require 'rails_helper'")
34
- test.assert_file "spec/cells/twitter_cell_spec.rb", t('RSpec.describe TwitterCell, type: :cell do')
35
- test.assert_file "spec/cells/twitter_cell_spec.rb", t('context \'cell rendering\' do')
36
- test.assert_file "spec/cells/twitter_cell_spec.rb", t('end')
37
- end
38
-
39
- it 'creates display state' do
40
- test.assert_file 'spec/cells/twitter_cell_spec.rb', t('context \'rendering display\' do')
41
- test.assert_file "spec/cells/twitter_cell_spec.rb", t('subject { cell(:twitter, Twitter.new).call(:display) }')
42
- test.assert_file 'spec/cells/twitter_cell_spec.rb', t('it { is_expected.to have_selector(\'h1\', text: \'Twitter#display\') }')
43
- test.assert_file 'spec/cells/twitter_cell_spec.rb', t('it { is_expected.to have_selector(\'p\', text: \'Find me in app/cells/twitter/display.erb\') }')
44
- test.assert_file "spec/cells/twitter_cell_spec.rb", t('end')
45
- end
46
-
47
- it 'creates form state' do
48
- test.assert_file 'spec/cells/twitter_cell_spec.rb', t('context \'rendering form\' do')
49
- test.assert_file "spec/cells/twitter_cell_spec.rb", t('subject { cell(:twitter, Twitter.new).call(:form) }')
50
- test.assert_file 'spec/cells/twitter_cell_spec.rb', t('it { is_expected.to have_selector(\'h1\', text: \'Twitter#form\') }')
51
- test.assert_file 'spec/cells/twitter_cell_spec.rb', t('it { is_expected.to have_selector(\'p\', text: \'Find me in app/cells/twitter/form.erb\') }')
52
- test.assert_file "spec/cells/twitter_cell_spec.rb", t('end')
53
- end
54
- end
55
-
56
- # context "When not defined Capybara" do
57
- # before(:all) do
58
- # test.run_generator %w(Twitter display form)
59
- # end
60
-
61
- # after(:all) do
62
- # FileUtils.rm_rf(DESTINATION_ROOT) # Cleanup after we are done testing
63
- # end
64
-
65
- # it "creates widget spec" do
66
- # test.assert_file "spec/cells/twitter_cell_spec.rb", t("require 'rails_helper'")
67
- # test.assert_file "spec/cells/twitter_cell_spec.rb", t('RSpec.describe TwitterCell, type: :cell do')
68
- # test.assert_file 'spec/cells/twitter_cell_spec.rb', t('context \'cell rendering\' do')
69
- # test.assert_file "spec/cells/twitter_cell_spec.rb", t('end')
70
- # end
71
-
72
- # it 'creates display state' do
73
- # test.assert_file 'spec/cells/twitter_cell_spec.rb', t('context \'rendering display\' do')
74
- # test.assert_file "spec/cells/twitter_cell_spec.rb", t('subject { cell(:twitter, Twitter.new).call(:display) }')
75
- # test.assert_file 'spec/cells/twitter_cell_spec.rb', t('it { is_expected.to include \'Twitter#display\' }')
76
- # test.assert_file "spec/cells/twitter_cell_spec.rb", t('it { is_expected.to include \'Find me in app/cells/twitter/display.erb\' }')
77
- # test.assert_file "spec/cells/twitter_cell_spec.rb", t('end')
78
- # end
79
-
80
- # it 'creates form state' do
81
- # test.assert_file 'spec/cells/twitter_cell_spec.rb', t('context \'rendering form\' do')
82
- # test.assert_file "spec/cells/twitter_cell_spec.rb", t('subject { cell(:twitter, Twitter.new).call(:form) }')
83
- # test.assert_file 'spec/cells/twitter_cell_spec.rb', t('it { is_expected.to include \'Twitter#form\' }')
84
- # test.assert_file 'spec/cells/twitter_cell_spec.rb', t('it { is_expected.to include \'Find me in app/cells/twitter/form.erb\' }')
85
- # test.assert_file "spec/cells/twitter_cell_spec.rb", t('end')
86
- # end
87
- # end
88
-
89
- # TODO: does rspec even work without capybara?
90
-
91
- context "When uses namespace" do
92
-
93
- before(:all) do
94
- test.run_generator %w(Forum::Comment display form)
95
- end
96
-
97
- after(:all) do
98
- FileUtils.rm_rf(DESTINATION_ROOT) # Cleanup after we are done testing
99
- end
100
-
101
- GENERATED_FILE = "spec/cells/forum/comment_cell_spec.rb"
102
-
103
- it "creates widget spec" do
104
- test.assert_file GENERATED_FILE, t("require 'rails_helper'")
105
- test.assert_file GENERATED_FILE, t('describe Forum::CommentCell, type: :cell do')
106
- test.assert_file GENERATED_FILE, t('context \'cell rendering\' do')
107
- test.assert_file GENERATED_FILE, t('end')
108
- end
109
-
110
- it 'creates display state' do
111
- test.assert_file GENERATED_FILE, t('context \'rendering display\' do')
112
- test.assert_file GENERATED_FILE, t('subject { cell("forum/comment", Forum::Comment.new).call(:display) }')
113
- # test.assert_file GENERATED_FILE, t('it { is_expected.to include \'Forum::Comment#display\' }')
114
- # test.assert_file GENERATED_FILE, t('it { is_expected.to include \'Find me in app/cells/forum/comment/display.erb\' }')
115
- test.assert_file GENERATED_FILE, t('end')
116
- end
117
-
118
- it 'creates form state' do
119
- test.assert_file GENERATED_FILE, t('context \'rendering form\' do')
120
- test.assert_file GENERATED_FILE, t('subject { cell("forum/comment", Forum::Comment.new).call(:form) }')
121
- # test.assert_file GENERATED_FILE, t('it { is_expected.to include \'Forum::Comment#form\' }')
122
- # test.assert_file GENERATED_FILE, t('it { is_expected.to include \'Find me in app/cells/forum/comment/form.erb\' }')
123
- test.assert_file GENERATED_FILE, t('end')
124
- end
125
- end
126
- end
@@ -1,26 +0,0 @@
1
- require 'spec_helper'
2
-
3
- class DummyCell < Cell::ViewModel
4
- def show
5
- "<p>I'm Dummy.</p>"
6
- end
7
-
8
- def update
9
- "Updating #{options[:what]}."
10
- end
11
- end
12
-
13
- class SongCell < Cell::ViewModel
14
- def show
15
- "#{model}!"
16
- end
17
- end
18
-
19
- describe "Cell::Testing in specs", type: :cell do
20
- describe "#cell" do
21
- it { expect(cell(:dummy).call).to have_text("I'm Dummy.") }
22
-
23
- # with user options.
24
- it { expect(cell(:song, "Don't Have The Cow").call).to have_text("Don't Have The Cow!") }
25
- end
26
- end
data/spec/spec_helper.rb DELETED
@@ -1,17 +0,0 @@
1
- require 'rails'
2
-
3
- module RSpecCells
4
- class Application < ::Rails::Application
5
- config.secret_token = 'x'*30
6
- end
7
- end
8
-
9
- require 'capybara/rails'
10
- require 'action_controller/railtie'
11
- require 'action_view/railtie'
12
- require 'rspec/rails'
13
-
14
- require 'cells'
15
- require 'rspec-cells'
16
-
17
- require 'capybara/rspec'