diff options
author | Louise Crow <louise.crow@gmail.com> | 2011-02-24 15:10:14 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2011-02-24 15:10:14 +0000 |
commit | 08a64f9e3139851fd65c7ba6969ee590b4afea6a (patch) | |
tree | 20c77e796002dfa95b2af3ba00ebd2f691c02fc7 /vendor/gems/rspec-1.3.1/Ruby1.9.rdoc | |
parent | 3757bb52c0aa86b779b00428d7ebe35b30cea1ee (diff) |
Adding rspec gem.
Diffstat (limited to 'vendor/gems/rspec-1.3.1/Ruby1.9.rdoc')
-rw-r--r-- | vendor/gems/rspec-1.3.1/Ruby1.9.rdoc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/vendor/gems/rspec-1.3.1/Ruby1.9.rdoc b/vendor/gems/rspec-1.3.1/Ruby1.9.rdoc new file mode 100644 index 000000000..e42cc85e4 --- /dev/null +++ b/vendor/gems/rspec-1.3.1/Ruby1.9.rdoc @@ -0,0 +1,31 @@ += RSpec and Ruby 1.9 + +RSpec runs on Ruby 1.9.1 with the following caveats. + +== Test::Unit + +RSpec/Test::Unit interop will run with the test-unit-1.2.3 gem, but you must install it. + +== Class Variables + +Due to changes in scoping rules, class variables within example groups are not +supported in Ruby 1.9. + + describe "a class variable" do + @@class_variable = "a class variable" + + it "can access class variables in examples in Ruby 1.8" do + with_ruby 1.8 do + @@class_variable.should == "a class variable" + end + end + + it "can NOT access class variables in examples in Ruby 1.9" do + with_ruby 1.9 do + lambda do + @@class_variable.should == "a class variable" + end.should raise_error(NameError) + end + end + end + |