spec/compiler_spec.rb in rouge-lang-0.0.8 vs spec/compiler_spec.rb in rouge-lang-0.0.9
- old
+ new
@@ -109,12 +109,21 @@
describe "sub-compilation behaviour" do
it { expect { compile.("[a]")
}.to raise_exception(Rouge::Namespace::VarNotFoundError) }
+ it { expect { compile.("\#{a}")
+ }.to raise_exception(Rouge::Namespace::VarNotFoundError) }
+
+ it { expect { compile.("(let [a 1] \#{a})")
+ }.to_not raise_exception }
+
context do
before { ns.set_here(:a, :a) }
it { expect { compile.("[a]")
+ }.to_not raise_exception }
+
+ it { expect { compile.("\#{a}")
}.to_not raise_exception }
end
it { expect { compile.("{b c}")
}.to raise_exception(Rouge::Namespace::VarNotFoundError) }