spec/opal_converter_spec.rb in jekyll-opal-0.1.0 vs spec/opal_converter_spec.rb in jekyll-opal-0.2.0
- old
+ new
@@ -3,15 +3,16 @@
describe(Jekyll::Converters::Opal) do
let(:bogus_opal) { "hi.there( oatmeal" }
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
end
@@ -26,9 +27,9 @@
it "converts Ruby into Opal" do
expect(subject.convert(simple_opal)).to eql(simple_js_output)
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