Sha256: 5019cdebe877f6f8b5eef4c7fc092a2336de09ad891d944b46707582a09140c3
Contents?: true
Size: 1.05 KB
Versions: 32
Compression:
Stored size: 1.05 KB
Contents
require 'spec_helper' module Spec module Example class ExampleGroupSubclass < ExampleGroup class << self attr_accessor :examples_ran end @@class_variable = :class_variable CONSTANT = :constant before(:each) do @instance_variable = :instance_variable end after(:all) do self.class.examples_ran = true end def a_method 22 end it "can access instance variables defined before(:each)" do @instance_variable.should == :instance_variable end it "can access class variables (Ruby 1.8 only)" do with_ruby 1.8 do @@class_variable.should == :class_variable end end it "can access constants" do CONSTANT.should == :constant end it "can access methods defined in the Example Group" do a_method.should == 22 end end describe ExampleGroupSubclass do it "should run" do ExampleGroupSubclass.examples_ran.should be_true end end end end
Version data entries
32 entries across 32 versions & 11 rubygems