We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83833fc commit 2948aedCopy full SHA for 2948aed
spec/ruby/library/English/alias_spec.rb
@@ -1,8 +1,14 @@
1
require_relative '../../spec_helper'
2
require 'English'
3
4
-describe "alias keyword" do
5
- it "aliases $ERROR_INFO to $! in English and $ERROR_INFO still returns a backtrace" do
6
- (1 / 0 rescue $ERROR_INFO).should_not == nil
+describe "English" do
+ it "aliases $! to $ERROR_INFO and $ERROR_INFO still returns an Exception with a backtrace" do
+ exception = (1 / 0 rescue $ERROR_INFO)
7
+ exception.should be_kind_of(Exception)
8
+ exception.backtrace.should be_kind_of(Array)
9
+ end
10
+
11
+ it "aliases $@ to $ERROR_POSITION and $ERROR_POSITION still returns a backtrace" do
12
+ (1 / 0 rescue $ERROR_POSITION).should be_kind_of(Array)
13
end
14
0 commit comments