Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe "a well formed invitation", :shared => true do
- it "should be valid" do
- invitation.should be_valid
- end
- it "should have saved succesfully" do
- invitation.should_not be_new_record
- end
- end
- describe "Creating an invitation from_params" do
- before(:each) do
- @params = valid_invitation_params
- @invitation = nil
- end
- def invitation
- @invitation ||= Invitation.from_params(@params)
- end
- describe "with all possible data" do
- it_should_behave_like "a well formed invitation"
- end
- describe "with only required data" do
- before(:each) do
- @params.except!(:email, :personal_msg)
- end
- it_should_behave_like "a well formed invitation"
- end
- end
Add Comment
Please, Sign In to add comment