Sha256: a706366d6c60dfbfd3f4e4101f56f1bb60498e13966644221bbe5ab289c38807

Contents?: true

Size: 901 Bytes

Versions: 8

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

8 entries across 8 versions & 1 rubygems

Version Path
rspec-1.2.7 Ruby1.9.rdoc
rspec-1.2.8 Ruby1.9.rdoc
rspec-1.2.1 Ruby1.9.rdoc
rspec-1.2.2 Ruby1.9.rdoc
rspec-1.2.6 Ruby1.9.rdoc
rspec-1.2.4 Ruby1.9.rdoc
rspec-1.2.3 Ruby1.9.rdoc
rspec-1.2.5 Ruby1.9.rdoc