scratchpad 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/scratchpad/page.rb +3 -3
- data/lib/scratchpad/version.rb +1 -1
- data/test/dummy/app/controllers/pages_controller.rb +0 -7
- data/test/dummy/app/models/foo.rb +8 -0
- data/test/dummy/app/views/pages/multiple_scratch_with_changed_object.html.erb +7 -0
- data/test/dummy/app/views/pages/scratch_object.html.erb +1 -1
- data/test/dummy/app/views/pages/scratch_with_changed_object.html.erb +6 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/log/test.log +2479 -0
- data/test/integration/rendering_test.rb +18 -2
- metadata +7 -1
@@ -12,15 +12,31 @@ class RenderingTest < ActionDispatch::IntegrationTest
|
|
12
12
|
assert_select "#scratchpad"
|
13
13
|
end
|
14
14
|
|
15
|
-
test "only one scratchpad should render if multiple
|
15
|
+
test "only one scratchpad should render if multiple scratches" do
|
16
16
|
get '/multiple_scratch'
|
17
17
|
assert_select "#scratchpad", 1
|
18
18
|
end
|
19
19
|
|
20
|
-
test "multiple
|
20
|
+
test "multiple scratches should render for multiple scratches" do
|
21
21
|
get '/multiple_scratch'
|
22
22
|
assert_select "#scratchpad" do
|
23
23
|
assert_select ".scratch", 2
|
24
24
|
end
|
25
25
|
end
|
26
|
+
|
27
|
+
test "object scratches should inspect the object" do
|
28
|
+
get '/scratch_object'
|
29
|
+
assert_select ".scratch", { html: "#", count: 0 }
|
30
|
+
end
|
31
|
+
|
32
|
+
test "object scratches should render object at time of scratch" do
|
33
|
+
get '/scratch_with_changed_object'
|
34
|
+
assert_select ".scratch", { html: /baz/, count: 1 }
|
35
|
+
end
|
36
|
+
|
37
|
+
test "object scratches should render changed object at each scratch" do
|
38
|
+
get '/multiple_scratch_with_changed_object'
|
39
|
+
assert_select ".scratch", { html: /baz/, count: 1 }
|
40
|
+
assert_select ".scratch", { html: /buzz/, count: 1 }
|
41
|
+
end
|
26
42
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scratchpad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mcianni
|
@@ -47,13 +47,16 @@ files:
|
|
47
47
|
- test/dummy/app/assets/stylesheets/application.css
|
48
48
|
- test/dummy/app/controllers/application_controller.rb
|
49
49
|
- test/dummy/app/controllers/pages_controller.rb
|
50
|
+
- test/dummy/app/models/foo.rb
|
50
51
|
- test/dummy/app/views/layouts/application.html.erb
|
51
52
|
- test/dummy/app/views/pages/_partial_scratch.html.erb
|
52
53
|
- test/dummy/app/views/pages/empty.html.erb
|
53
54
|
- test/dummy/app/views/pages/multiple_scratch.html.erb
|
55
|
+
- test/dummy/app/views/pages/multiple_scratch_with_changed_object.html.erb
|
54
56
|
- test/dummy/app/views/pages/no_scratch.html.erb
|
55
57
|
- test/dummy/app/views/pages/scratch.html.erb
|
56
58
|
- test/dummy/app/views/pages/scratch_object.html.erb
|
59
|
+
- test/dummy/app/views/pages/scratch_with_changed_object.html.erb
|
57
60
|
- test/dummy/app/views/pages/scratch_with_partial_scratch.html.erb
|
58
61
|
- test/dummy/bin/bundle
|
59
62
|
- test/dummy/bin/rails
|
@@ -117,13 +120,16 @@ test_files:
|
|
117
120
|
- test/dummy/app/assets/stylesheets/application.css
|
118
121
|
- test/dummy/app/controllers/application_controller.rb
|
119
122
|
- test/dummy/app/controllers/pages_controller.rb
|
123
|
+
- test/dummy/app/models/foo.rb
|
120
124
|
- test/dummy/app/views/layouts/application.html.erb
|
121
125
|
- test/dummy/app/views/pages/_partial_scratch.html.erb
|
122
126
|
- test/dummy/app/views/pages/empty.html.erb
|
123
127
|
- test/dummy/app/views/pages/multiple_scratch.html.erb
|
128
|
+
- test/dummy/app/views/pages/multiple_scratch_with_changed_object.html.erb
|
124
129
|
- test/dummy/app/views/pages/no_scratch.html.erb
|
125
130
|
- test/dummy/app/views/pages/scratch.html.erb
|
126
131
|
- test/dummy/app/views/pages/scratch_object.html.erb
|
132
|
+
- test/dummy/app/views/pages/scratch_with_changed_object.html.erb
|
127
133
|
- test/dummy/app/views/pages/scratch_with_partial_scratch.html.erb
|
128
134
|
- test/dummy/bin/bundle
|
129
135
|
- test/dummy/bin/rails
|