konacha 3.1.0 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +4 -0
- data/app/controllers/konacha/specs_controller.rb +1 -0
- data/app/views/konacha/specs/iframe.html.erb +1 -1
- data/konacha.gemspec +1 -1
- data/lib/konacha/engine.rb +1 -0
- data/spec/controllers/specs_controller_spec.rb +2 -0
- data/spec/views/specs/iframe.html.erb_spec.rb +13 -1
- 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: 489ecf076200dc9e9136450815b0dd75a8fb5a34
|
4
|
+
data.tar.gz: 970b7cf761bcd3fafe1a0d1e391b76be3012065e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2614e238452851ba76e0fdbb6e2ab354613661758518d5dfb73e72b90f67f7a2b0c53bd7c947ed0032b8214a1a7ef1bd25aa4b3214a485c7f15bcb1f6bcffe05
|
7
|
+
data.tar.gz: 34e5af431dc67e116d644d46e5c7c3b3ba9180b0d811d81f1765c2e1bc125f4b4564da7a9b929a469ba27d5c86a2d8af898eff756c636a9c91a62b408da62062
|
data/History.md
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
<%= stylesheet_link_tag file, :debug => false %>
|
10
10
|
<% end %>
|
11
11
|
|
12
|
-
<%= javascript_include_tag
|
12
|
+
<%= javascript_include_tag *@javascripts, :debug => false %>
|
13
13
|
<%= javascript_include_tag @spec.asset_name %>
|
14
14
|
</head>
|
15
15
|
<body>
|
data/konacha.gemspec
CHANGED
@@ -17,7 +17,7 @@ the asset pipeline and engines.}
|
|
17
17
|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
18
|
gem.name = "konacha"
|
19
19
|
gem.require_paths = ["lib"]
|
20
|
-
gem.version = "3.
|
20
|
+
gem.version = "3.2.0"
|
21
21
|
gem.license = "MIT"
|
22
22
|
|
23
23
|
gem.add_dependency "railties", ">= 3.1", "< 5"
|
data/lib/konacha/engine.rb
CHANGED
@@ -39,6 +39,7 @@ module Konacha
|
|
39
39
|
options.application ||= self.class.application(app)
|
40
40
|
options.driver ||= :selenium
|
41
41
|
options.stylesheets ||= %w(application)
|
42
|
+
options.javascripts ||= %w(chai konacha/iframe)
|
42
43
|
options.verbose ||= false
|
43
44
|
options.runner_port ||= nil
|
44
45
|
options.formatters ||= self.class.formatters
|
@@ -23,6 +23,8 @@ describe Konacha::SpecsController do
|
|
23
23
|
Konacha::Spec.should_receive(:find_by_name).with("spec_name") { :spec }
|
24
24
|
get :iframe, :name => "spec_name"
|
25
25
|
assigns[:spec].should == :spec
|
26
|
+
assigns[:stylesheets].should == Konacha::Engine.config.konacha.stylesheets
|
27
|
+
assigns[:javascripts].should == Konacha::Engine.config.konacha.javascripts
|
26
28
|
end
|
27
29
|
|
28
30
|
it "404s if there is no match for the given path" do
|
@@ -3,6 +3,7 @@ require 'spec_helper'
|
|
3
3
|
describe "konacha/specs/iframe" do
|
4
4
|
before do
|
5
5
|
assign(:stylesheets, [])
|
6
|
+
assign(:javascripts, [])
|
6
7
|
end
|
7
8
|
|
8
9
|
def spec_double(asset_name)
|
@@ -13,7 +14,8 @@ describe "konacha/specs/iframe" do
|
|
13
14
|
assign(:spec, spec_double("a_spec"))
|
14
15
|
|
15
16
|
view.stub(:javascript_include_tag)
|
16
|
-
view.should_receive(:javascript_include_tag).with(
|
17
|
+
view.should_receive(:javascript_include_tag).with(:debug => false).ordered
|
18
|
+
view.should_receive(:javascript_include_tag).with("a_spec").ordered
|
17
19
|
|
18
20
|
render
|
19
21
|
end
|
@@ -28,6 +30,16 @@ describe "konacha/specs/iframe" do
|
|
28
30
|
render
|
29
31
|
end
|
30
32
|
|
33
|
+
it "renders the javascripts" do
|
34
|
+
assign(:spec, spec_double("a_spec"))
|
35
|
+
assign(:javascripts, %w(foo bar))
|
36
|
+
|
37
|
+
view.should_receive(:javascript_include_tag).with("foo", "bar", :debug => false).ordered
|
38
|
+
view.should_receive(:javascript_include_tag).with("a_spec").ordered
|
39
|
+
|
40
|
+
render
|
41
|
+
end
|
42
|
+
|
31
43
|
it "includes a path data attribute" do
|
32
44
|
assign(:spec, spec_double("a_spec"))
|
33
45
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: konacha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Firebaugh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|