Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use Shoulda's 'subject' as intended

  • Loading branch information...
commit a03a0f1ef46d6fc6f037c0cf31a0ef41c11c1d0e 1 parent b92e086
@joshuaclayton authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 test/unit/pea_test.rb
View
8 test/unit/pea_test.rb
@@ -10,12 +10,12 @@ class PeaTest < ActiveSupport::TestCase
end
context "An unsaved pea" do
- setup { @pea = Factory.build(:pea) }
+ subject { Factory.build(:pea) }
should "generate a key after it's created" do
- assert_nil @pea.key
- @pea.save
- assert @pea.key.present?
+ assert_nil subject.key
+ subject.save
+ assert subject.key.present?
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.