Displaying 1 result from an estimated 1 matches for "writing1".
Did you mean:
writing
2014 May 29
0
How to make the tests pass in an elegant way? Ruby on Rails
...model:
class Worker < ActiveRecord::Base
attr_accessible :first_name, :last_name
has_many :writings
end
Here is the spec:
require 'spec_helper.rb'
describe Worker do
describe "merging two workers" do
before(:each) do
@writing1 = Writing.create!(:writing_text => "Winner's note")
@writing2 = Writing.create!(:writing_text => "Loser's note")
@winner = Worker.create!(:first_name => "Jim", :last_name =>
"Sullivan", :email => "winner-Re5JQE...