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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9706057c4d4f50ab91f189c6a9c116e0990795c6
4
- data.tar.gz: 34ca0d65cb02b227dbb22dcce18ec0e9e91d1927
3
+ metadata.gz: 489ecf076200dc9e9136450815b0dd75a8fb5a34
4
+ data.tar.gz: 970b7cf761bcd3fafe1a0d1e391b76be3012065e
5
5
  SHA512:
6
- metadata.gz: 28e650c18b0f41f2ccd199c3b8b1eca3c62ecebf06e117d06ca0aa0ee3242d7e8dc9a94d4898504c82129f95f5ba1e822626b7fb373e34ce51c41c8fde1d7e2d
7
- data.tar.gz: b0f2fd3fbb0a117345ee85804e970a1bbaf047718c5a73354b616fd098d899829e8e6e58fccb9b66f0ef97105f69a1ab4b8f1e493acd1b12b734acb9ea742499
6
+ metadata.gz: 2614e238452851ba76e0fdbb6e2ab354613661758518d5dfb73e72b90f67f7a2b0c53bd7c947ed0032b8214a1a7ef1bd25aa4b3214a485c7f15bcb1f6bcffe05
7
+ data.tar.gz: 34e5af431dc67e116d644d46e5c7c3b3ba9180b0d811d81f1765c2e1bc125f4b4564da7a9b929a469ba27d5c86a2d8af898eff756c636a9c91a62b408da62062
data/History.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # master
2
2
 
3
+ # 3.2.0
4
+
5
+ * Allow configuration of loaded javascript files (#167)
6
+
3
7
  # 3.1.0
4
8
 
5
9
  * Update mocha (1.17.1) and chai (1.9.0)
@@ -12,6 +12,7 @@ module Konacha
12
12
  def iframe
13
13
  @spec = Konacha::Spec.find_by_name(params[:name])
14
14
  @stylesheets = Konacha::Engine.config.konacha.stylesheets
15
+ @javascripts = Konacha::Engine.config.konacha.javascripts
15
16
  end
16
17
  end
17
18
  end
@@ -9,7 +9,7 @@
9
9
  <%= stylesheet_link_tag file, :debug => false %>
10
10
  <% end %>
11
11
 
12
- <%= javascript_include_tag "chai", "konacha/iframe", :debug => false %>
12
+ <%= javascript_include_tag *@javascripts, :debug => false %>
13
13
  <%= javascript_include_tag @spec.asset_name %>
14
14
  </head>
15
15
  <body>
@@ -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.1.0"
20
+ gem.version = "3.2.0"
21
21
  gem.license = "MIT"
22
22
 
23
23
  gem.add_dependency "railties", ">= 3.1", "< 5"
@@ -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("a_spec")
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.1.0
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-02-06 00:00:00.000000000 Z
11
+ date: 2014-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties