Sha256: 27209e0519db7fe57499bfaf1b665bdecd26e7ae18d23893653981266660dd9c

Contents?: true

Size: 804 Bytes

Versions: 32

Compression:

Stored size: 804 Bytes

Contents

= 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

Version data entries

32 entries across 32 versions & 11 rubygems

Version Path
rspec-instructure-1.3.3 Ruby1.9.rdoc
radiant-1.0.0 ruby-debug/ruby/1.8/gems/rspec-1.3.2/Ruby1.9.rdoc
rspec-1.3.2 Ruby1.9.rdoc
rspec-1.3.1 Ruby1.9.rdoc
rspec-1.3.1.rc Ruby1.9.rdoc
rspec-1.3.0 Ruby1.9.rdoc
hubbub-0.0.11 lib/vendor/plugins/rspec/Ruby1.9.rdoc
hubbub-0.0.10 lib/vendor/plugins/rspec/Ruby1.9.rdoc
hubbub-0.0.9 lib/vendor/plugins/rspec/Ruby1.9.rdoc
hubbub-0.0.8 lib/vendor/plugins/rspec/Ruby1.9.rdoc
hubbub-0.0.6 lib/vendor/plugins/rspec/Ruby1.9.rdoc
simple-templater-0.0.1.4 gems/gems/rspec-1.2.9/Ruby1.9.rdoc
media-path-0.1.2 vendor/rspec/Ruby1.9.rdoc
simple-templater-0.0.1.3 vendor/rspec/Ruby1.9.rdoc
pupu-0.0.2.pre vendor/rspec/Ruby1.9.rdoc
media-path-0.1.1.pre vendor/rspec/Ruby1.9.rdoc
simple-templater-0.0.1.2 vendor/rspec/Ruby1.9.rdoc
media-path-0.1.1 vendor/rspec/Ruby1.9.rdoc
simple-templater-0.0.1.1 vendor/rspec/Ruby1.9.rdoc
pupu-0.0.2 vendor/rspec/Ruby1.9.rdoc