Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

Commit

Permalink
update History and Upgrade info
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Sep 8, 2009
1 parent f146ee9 commit 8eea6ab
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 2 additions & 0 deletions History.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
describe Array do
its(:length) { should == 0 }
(Stephen Touset). Closes #833
* spec command automatically uses spec/spec.opts if it is present
(suggestion from Yehuda Katz)

* not really a bug fix or enhancement
* temporarily moved heckle feature to features-pending (waiting to see what
Expand Down
20 changes: 17 additions & 3 deletions Upgrade.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

== What's new

=== spec/spec.opts

If you have a spec/spec.opts file, the spec command will now use that
automatically as long as you don't include any options on the command line.

=== let()

Writing specs tends to follow a regular pattern of using local variables, discovering duplication, and then having to convert to local variables to instance variables by adding an "@" symbol. The let() method assigns the result of a lazy eval'd block as the return value of an instance method using
Expand All @@ -12,7 +17,7 @@ the same name. This way you can go from this:
subscription = Subscription.create :limit => 1
subscription...
end

it "does something else" do
subscription = Subscription.create :limit => 1
subscription...
Expand All @@ -23,16 +28,25 @@ to this:

describe Subscription do
let(:subscription) { Subscription.create :limit => 1 }

it "does something" do
subscription...
end

it "does something else" do
subscription...
end
end

=== its()

If you're in the habit of writing one-liners using implicit subject, this new
its() feature is for you. Here's the basic idea:

describe Array do
its(:length) { should == 0 }
end

= Upgrade to rspec-1.2.3-1.2.7

== What's Changed
Expand Down

0 comments on commit 8eea6ab

Please sign in to comment.