Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test against Jekyll 2 & 3 #8

Merged
merged 5 commits into from
Nov 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
language: ruby
script : script/cibuild
sudo: false
cache: bundler
rvm:
- 2.2
- 2.1
- 2.0
- 1.9.3
notifications:
email: false
branches:
only:
- master

matrix:
include:
-
rvm: 1.9
env: JEKYLL_VERSION=2.0
env:
- JEKYLL_VERSION=3.0
- JEKYLL_VERSION=2.0
4 changes: 2 additions & 2 deletions jekyll-opal.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_runtime_dependency "opal", "~> 0.6.0"
spec.add_runtime_dependency "opal", "~> 0.8.0"

spec.add_development_dependency "bundler", "~> 1.6"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "jekyll", "~> 2.0"
spec.add_development_dependency "jekyll", ENV["JEKYLL_VERSION"] ? "~> #{ENV["JEKYLL_VERSION"]}" : ">= 2.0"
end
11 changes: 6 additions & 5 deletions spec/opal_converter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
let(:simple_opal) { "puts 'ohai jekyll'" }
let(:simple_js_output) do
<<-JS
/* Generated by Opal 0.6.2 */
(function($opal) {
var self = $opal.top, $scope = $opal, nil = $opal.nil, $breaker = $opal.breaker, $slice = $opal.slice;
/* Generated by Opal 0.8.1 */
(function(Opal) {
Opal.dynamic_require_severity = "error";
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice;

$opal.add_stubs(['$puts']);
Opal.add_stubs(['$puts']);
return self.$puts("ohai jekyll")
})(Opal);
JS
Expand All @@ -28,7 +29,7 @@
end

it "explodes on bad input" do
expect(->{ subject.convert(bogus_opal) }).to raise_error
expect(->{ subject.convert(bogus_opal) }).to raise_error(RuntimeError)
end

end
2 changes: 1 addition & 1 deletion spec/opal_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
end

it "can build the opal stdlib" do
expect(subject.opal_stdlib).to match("(Opal);")
expect(subject.opal_stdlib.to_s).to match("(Opal);")
end

context "when ensuring directory is there" do
Expand Down