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