Sha256: e558b4bf1968db4531297468ecf1e6a64ef608ad1cc4fe1819bc96d53b2c8082

Contents?: true

Size: 1.6 KB

Versions: 37

Compression:

Stored size: 1.6 KB

Contents

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

module Spec
  module Example
    # describe Example do
    #   before(:each) do
    #     @example = Example.new "example" do
    #       foo
    #     end
    #   end
    #   
    #   it "should tell you its docstring" do
    #     @example.description.should == "example"
    #   end
    # 
    #   it "should execute its block in the context provided" do
    #     context = Class.new do
    #       def foo
    #         "foo"
    #       end
    #     end.new
    #     @example.run_in(context).should == "foo"
    #   end
    # end
    # 
    # describe Example, "#description" do
    #   it "should default to NO NAME when not passed anything when there are no matchers" do
    #     example = Example.new {}
    #     example.run_in(Object.new)
    #     example.description.should == "NO NAME"
    #   end
    # 
    #   it "should default to NO NAME description (Because of --dry-run) when passed nil and there are no matchers" do
    #     example = Example.new(nil) {}
    #     example.run_in(Object.new)
    #     example.description.should == "NO NAME"
    #   end
    # 
    #   it "should allow description to be overridden" do
    #     example = Example.new("Test description")
    #     example.description.should == "Test description"
    #   end
    # 
    #   it "should use description generated from matcher when there is no passed in description" do
    #     example = Example.new(nil) do
    #       1.should == 1
    #     end
    #     example.run_in(Object.new)
    #     example.description.should == "should == 1"
    #   end
    # end
  end
end

Version data entries

37 entries across 37 versions & 6 rubygems

Version Path
jnstq-acts_as_sms-0.1.0 test/vendor/plugins/rspec/spec/spec/example/example_spec.rb
jnstq-acts_as_sms-0.1.1 test/vendor/plugins/rspec/spec/spec/example/example_spec.rb
jnstq-acts_as_sms-0.1.3 test/vendor/plugins/rspec/spec/spec/example/example_spec.rb
jnstq-acts_as_sms-0.1.4 test/vendor/plugins/rspec/spec/spec/example/example_spec.rb
picolena-0.0.99 app_generators/picolena/templates/vendor/plugins/rspec/spec/spec/example/example_spec.rb
picolena-0.1.1 rails_plugins/rspec/spec/spec/example/example_spec.rb
picolena-0.1.0 rails_plugins/rspec/spec/spec/example/example_spec.rb
picolena-0.1.2 rails_plugins/rspec/spec/spec/example/example_spec.rb
picolena-0.1.3 rails_plugins/rspec/spec/spec/example/example_spec.rb
picolena-0.1.4 rails_plugins/rspec/spec/spec/example/example_spec.rb
picolena-0.1.5 rails_plugins/rspec/spec/spec/example/example_spec.rb
radiant-0.6.5.1 vendor/plugins/rspec/spec/spec/example/example_spec.rb
radiant-0.6.5 vendor/plugins/rspec/spec/spec/example/example_spec.rb
radiant-0.6.6 vendor/plugins/rspec/spec/spec/example/example_spec.rb
radiant-0.6.7 vendor/plugins/rspec/spec/spec/example/example_spec.rb
radiant-0.6.9 vendor/plugins/rspec/spec/spec/example/example_spec.rb
radiant-0.6.8 vendor/plugins/rspec/spec/spec/example/example_spec.rb
rspec-0.0.10 spec/spec/example/example_spec.rb
rspec-1.1.1 spec/spec/example/example_spec.rb
rspec-1.1.0 spec/spec/example/example_spec.rb