saks/layouts — comment on commit fdb9c4b3d77d4b368db69ce6a6eb57c93e1005ce
File: spec/models/user_spec.rb line 12
By saks:

обычно это делают немного подругому.

let(:valid_attributes) do
{
:name => "Example User",
:email => "user@example.com",
:password => "foobar",
:password_confirmation => "foobar"
}
end

subject { User.new valid_attributes }

и потом в тестах:

it "should create a new instance given a valid attribute" do
subject.save!
end

it "should require an email address" do
subject.email = ''
subject.should_not be_valid
end

ну и так далее, читай [тут](https://www.relishapp.com/rspec/rspec-core/docs/subject/explicit-subject)