Skip to content

Commit c7a6259

Browse files
committed
minor chage
1 parent a317089 commit c7a6259

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

lib/lazy_high_charts.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require File.join(File.dirname(__FILE__), *%w[lazy_high_charts options_key_filter])
66
require File.join(File.dirname(__FILE__), *%w[lazy_high_charts layout_helper])
77
require File.join(File.dirname(__FILE__), *%w[lazy_high_charts high_chart])
8-
require File.join(File.dirname(__FILE__), *%w[lazy_high_charts iruby_notebook]) if defined? IRuby
8+
require File.join(File.dirname(__FILE__), *%w[lazy_high_charts iruby_notebook])
99
require File.join(File.dirname(__FILE__), *%w[lazy_high_charts high_chart_globals])
1010
if defined?(::Rails::Railtie)
1111
require File.join(File.dirname(__FILE__), *%w[lazy_high_charts railtie])

lib/lazy_high_charts/iruby_notebook.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ module LazyHighCharts
77
}
88
@@additional_libraries = {}
99

10-
# Load extension library to IRuby notebook after Nyaplotjs is loaded
10+
# Load extension library to IRuby notebook after LazyHighCharts js is loaded
1111
def self.add_dependency(name, url)
1212
@@dep_libraries[name]=url;
1313
end
1414

15-
# Load extension library to IRuby notebook before Nyaplotjs is loaded
15+
# Load extension library to IRuby notebook before LazyHighCharts js is loaded
1616
def self.add_additional_library(name, url)
1717
@@additional_libraries[name]=url
1818
end

spec/iruby_notebook_spec.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
require File.dirname(__FILE__) + '/spec_helper'
2+
require 'iruby/display'
3+
require 'iruby/utils'
24

35
describe LazyHighCharts do
46

@@ -50,19 +52,19 @@ module LazyHighCharts
5052
end
5153

5254
context 'without parameters' do
53-
subject(:load_notebook) { Highcharts.load_notebook }
55+
subject(:load_notebook) { LazyHighCharts.load_notebook }
5456

5557
include_examples 'inline script'
5658
end
5759

5860
context 'given `assets` parameter is `:inline`' do
59-
subject(:load_notebook) { Highcharts.load_notebook(:inline) }
61+
subject(:load_notebook) { LazyHighCharts.load_notebook(:inline) }
6062

6163
include_examples 'inline script'
6264
end
6365

6466
context 'given `assets` parameter is `:cdn`' do
65-
subject(:load_notebook) { Highcharts.load_notebook(:cdn) }
67+
subject(:load_notebook) { LazyHighCharts.load_notebook(:cdn) }
6668

6769
it 'loads javascript sources from cdn' do
6870
expect(IRuby).to receive(:display) do |rep|
@@ -73,5 +75,5 @@ module LazyHighCharts
7375
expect(load_notebook).to eq(nil)
7476
end
7577
end
76-
78+
end
7779
end

0 commit comments

Comments
 (0)