rspec-cells 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.textile +4 -0
- data/README.rdoc +1 -1
- data/lib/generators/rspec/templates/cell_spec.erb +0 -8
- data/lib/rspec/cells/version.rb +1 -1
- data/spec/cells/cell_generator_spec.rb +0 -24
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63aa56b8e9ae132537ab2992ad9ed08783ed7350
|
4
|
+
data.tar.gz: 825b81132c90eac0bbec8924205c9318e4c94868
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17ee62a830230d3823dde7cd9aeaf41e1789aff3381b21f89a3caf0bf503a3ccf1caffa7ad2f4fafcab87a55f0a5d163acd355b0c099a8d541f1ab1ccb588722
|
7
|
+
data.tar.gz: 8171f1ff29d0fbaefe365c65973f58dd5fea98e32807c1798608c2eaf90ad0436c6b311ee88308d1c66870e34b2fba97a2e78b1c81710a7f0d6d99af9193e229
|
data/CHANGES.textile
CHANGED
data/README.rdoc
CHANGED
@@ -49,7 +49,7 @@ After preparing the instance you can use +render_state+ for triggering the state
|
|
49
49
|
|
50
50
|
=== View Models
|
51
51
|
|
52
|
-
With the introduction of cells [view models]() you get a slightly different API for your specs (which is identical to your app's one).
|
52
|
+
With the introduction of cells [view models](https://github.com/apotonick/cells#view-models) you get a slightly different API for your specs (which is identical to your app's one).
|
53
53
|
|
54
54
|
it "renders empty posts list" do
|
55
55
|
posts = cell(:posts).count.should should have_css "#comment_new .flag", visible: true)
|
@@ -2,14 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe <%= class_name %>Cell do
|
4
4
|
|
5
|
-
context "cell instance" do
|
6
|
-
subject { cell(<%= cell_name %>) }
|
7
|
-
|
8
|
-
<%- for state in actions -%>
|
9
|
-
it { should respond_to(:<%= state %>) }
|
10
|
-
<%- end -%>
|
11
|
-
end
|
12
|
-
|
13
5
|
context "cell rendering" do
|
14
6
|
<%- actions.each_with_index do |state, index| -%>
|
15
7
|
context "rendering <%= state %>" do
|
data/lib/rspec/cells/version.rb
CHANGED
@@ -30,14 +30,6 @@ describe Rspec::Generators::CellGenerator do
|
|
30
30
|
Object.send(:remove_const, :"Capybara")
|
31
31
|
end
|
32
32
|
|
33
|
-
it 'creates respond_to states specs' do
|
34
|
-
test.assert_file "spec/cells/twitter_cell_spec.rb", t('context "cell instance" do')
|
35
|
-
test.assert_file "spec/cells/twitter_cell_spec.rb", t('subject { cell(:twitter) }')
|
36
|
-
test.assert_file "spec/cells/twitter_cell_spec.rb", t('it { should respond_to(:display) }')
|
37
|
-
test.assert_file "spec/cells/twitter_cell_spec.rb", t('it { should respond_to(:form) }')
|
38
|
-
test.assert_file "spec/cells/twitter_cell_spec.rb", t('end')
|
39
|
-
end
|
40
|
-
|
41
33
|
it "creates widget spec" do
|
42
34
|
test.assert_file "spec/cells/twitter_cell_spec.rb", t("require 'spec_helper'")
|
43
35
|
test.assert_file "spec/cells/twitter_cell_spec.rb", t('describe TwitterCell do')
|
@@ -71,14 +63,6 @@ describe Rspec::Generators::CellGenerator do
|
|
71
63
|
FileUtils.rm_rf(DESTINATION_ROOT) # Cleanup after we are done testing
|
72
64
|
end
|
73
65
|
|
74
|
-
it 'creates respond_to states specs' do
|
75
|
-
test.assert_file "spec/cells/twitter_cell_spec.rb", t('context "cell instance" do')
|
76
|
-
test.assert_file "spec/cells/twitter_cell_spec.rb", t('subject { cell(:twitter) }')
|
77
|
-
test.assert_file "spec/cells/twitter_cell_spec.rb", t('it { should respond_to(:display) }')
|
78
|
-
test.assert_file "spec/cells/twitter_cell_spec.rb", t('it { should respond_to(:form) }')
|
79
|
-
test.assert_file "spec/cells/twitter_cell_spec.rb", t('end')
|
80
|
-
end
|
81
|
-
|
82
66
|
it "creates widget spec" do
|
83
67
|
test.assert_file "spec/cells/twitter_cell_spec.rb", t("require 'spec_helper'")
|
84
68
|
test.assert_file "spec/cells/twitter_cell_spec.rb", t('describe TwitterCell do')
|
@@ -115,14 +99,6 @@ describe Rspec::Generators::CellGenerator do
|
|
115
99
|
|
116
100
|
GENERATED_FILE = "spec/cells/forum/comment_cell_spec.rb"
|
117
101
|
|
118
|
-
it 'creates respond_to states specs' do
|
119
|
-
test.assert_file GENERATED_FILE, t('context "cell instance" do')
|
120
|
-
test.assert_file GENERATED_FILE, t('subject { cell("forum/comment") }')
|
121
|
-
test.assert_file GENERATED_FILE, t('it { should respond_to(:display) }')
|
122
|
-
test.assert_file GENERATED_FILE, t('it { should respond_to(:form) }')
|
123
|
-
test.assert_file GENERATED_FILE, t('end')
|
124
|
-
end
|
125
|
-
|
126
102
|
it "creates widget spec" do
|
127
103
|
test.assert_file GENERATED_FILE, t("require 'spec_helper'")
|
128
104
|
test.assert_file GENERATED_FILE, t('describe Forum::CommentCell do')
|
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.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|