Sha256: 1eddd53bebba3f54121d99d4929d69a43c5d02c5d58ec7025e29e93648b8b660

Contents?: true

Size: 901 Bytes

Versions: 6

Compression:

Stored size: 901 Bytes

Contents

# RSpec and Ruby 1.9

Currently, RSpec (core) is mostly compatible with Ruby 1.9.1. There are still
outstanding issues, some of which we plan to address and some we don't.

## 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

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
dchelimsky-rspec-1.1.99.13 Ruby1.9.markdown
dchelimsky-rspec-1.1.99.6 Ruby1.9.markdown
dchelimsky-rspec-1.1.99.7 Ruby1.9.markdown
dchelimsky-rspec-1.1.99.8 Ruby1.9.markdown
dchelimsky-rspec-1.1.99.9 Ruby1.9.markdown
rspec-1.2.0 Ruby1.9.markdown