Sha256: 73b44ef7375f2b406b336ce6b4cdd079cbe3103efc43c2e42c349110c2552be8

Contents?: true

Size: 1.63 KB

Versions: 6

Compression:

Stored size: 1.63 KB

Contents

require File.dirname(__FILE__) + '/../../spec_helper'

module Spec
  module Example

    describe ExampleProxy do

      describe "#description" do
        it "provides the submitted description" do
          proxy = ExampleProxy.new("the description")
          proxy.description.should   == "the description"
        end
      end
      
      describe "#update" do
        it "updates the description" do
          proxy = ExampleProxy.new("old description")
          proxy.update("new description")
          proxy.description.should == "new description"
        end
      end

      describe "#options" do
        it "provides the submitted options" do
          proxy = ExampleProxy.new(:ignore, {:these => :options})
          proxy.options.should           == {:these => :options}
        end
      end

      describe "#backtrace (DEPRECATED - use #location)" do
        before(:each) do
          Spec.stub!(:deprecate)
        end
        
        it "is deprecated" do
          Spec.should_receive(:deprecate)
          proxy = ExampleProxy.new(:ignore, {}, "path/to/location:37")
          proxy.backtrace
        end
        
        it "provides the location of the declaration of this group" do
          proxy = ExampleProxy.new(:ignore, {}, "path/to/location:37")
          proxy.backtrace.should             == "path/to/location:37"
        end
      end
      
      describe "#location" do
        it "provides the location of the declaration of this group" do
          proxy = ExampleProxy.new(:ignore, {}, "path/to/location:37")
          proxy.location.should              == "path/to/location:37"
        end
      end
      
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rspec-1.2.7 spec/spec/example/example_proxy_spec.rb
rspec-1.2.8 spec/spec/example/example_proxy_spec.rb
rspec-1.2.6 spec/spec/example/example_proxy_spec.rb
rspec-1.2.3 spec/spec/example/example_proxy_spec.rb
rspec-1.2.4 spec/spec/example/example_proxy_spec.rb
rspec-1.2.5 spec/spec/example/example_proxy_spec.rb