Sha256: d8c7bf0148527a3f88241ae9216e1c9a7691b01198ffbb522988179998b5e603

Contents?: true

Size: 962 Bytes

Versions: 10

Compression:

Stored size: 962 Bytes

Contents

require 'spec_helper'

module Spec
  module Rails
    module Example
      describe ModelExampleGroup do
        accesses_configured_helper_methods
        
        if defined?(ActiveRecord::TestCase)
          it "derives from ActiveRecord::TestCase" do
            group = describe("foo", :type => :model) do; end
            group.ancestors.should include(ActiveRecord::TestCase)
          end
        else
          it "derives from ActiveSupport::TestCase" do
            group = describe("foo", :type => :model) do; end
            group.ancestors.should include(ActiveSupport::TestCase)
          end
        end
        
        it "clears its name from the description" do
          group = describe("foo", :type => :model) do
            $nested_group = describe("bar") do
            end
          end
          group.description.to_s.should == "foo"
          $nested_group.description.to_s.should == "foo bar"
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
radiant-1.0.0 ruby-debug/ruby/1.8/gems/rspec-rails-1.3.4/spec/spec/rails/example/model_example_group_spec.rb
richzhou-rspec-rails-1.3.4 spec/spec/rails/example/model_example_group_spec.rb
rspec-rails-1.3.4 spec/spec/rails/example/model_example_group_spec.rb
rspec-rails-1.3.3 spec/spec/rails/example/model_example_group_spec.rb
rspec-rails-1.3.3.rc spec/spec/rails/example/model_example_group_spec.rb
rspec-rails-w-factory_girl-1.3.2.1 spec/spec/rails/example/model_example_group_spec.rb
rspec-rails-w-factory_girl-1.3.2 spec/spec/rails/example/model_example_group_spec.rb
rspec-rails-1.3.2 spec/spec/rails/example/model_example_group_spec.rb
rspec-rails-1.3.1 spec/spec/rails/example/model_example_group_spec.rb
rspec-rails-1.3.0 spec/spec/rails/example/model_example_group_spec.rb